Class: MicrosoftGraph::Models::UnifiedRoleManagementPolicy

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/unified_role_management_policy.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new unifiedRoleManagementPolicy and sets the default values.



41
42
43
# File 'lib/models/unified_role_management_policy.rb', line 41

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a unified_role_management_policy

Raises:

  • (StandardError)


49
50
51
52
# File 'lib/models/unified_role_management_policy.rb', line 49

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return UnifiedRoleManagementPolicy.new
end

Instance Method Details

#descriptionObject

Gets the description property value. Description for the policy.

Returns:

  • a string



57
58
59
# File 'lib/models/unified_role_management_policy.rb', line 57

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Description for the policy.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



65
66
67
# File 'lib/models/unified_role_management_policy.rb', line 65

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Display name for the policy.

Returns:

  • a string



72
73
74
# File 'lib/models/unified_role_management_policy.rb', line 72

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name for the policy.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



80
81
82
# File 'lib/models/unified_role_management_policy.rb', line 80

def display_name=(value)
    @display_name = value
end

#effective_rulesObject

Gets the effectiveRules property value. The list of effective rules like approval rules and expiration rules evaluated based on inherited referenced rules. For example, if there is a tenant-wide policy to enforce enabling an approval rule, the effective rule will be to enable approval even if the policy has a rule to disable approval. Supports $expand.

Returns:

  • a unified_role_management_policy_rule



87
88
89
# File 'lib/models/unified_role_management_policy.rb', line 87

def effective_rules
    return @effective_rules
end

#effective_rules=(value) ⇒ Object

Sets the effectiveRules property value. The list of effective rules like approval rules and expiration rules evaluated based on inherited referenced rules. For example, if there is a tenant-wide policy to enforce enabling an approval rule, the effective rule will be to enable approval even if the policy has a rule to disable approval. Supports $expand.

Parameters:

  • value

    Value to set for the effectiveRules property.

Returns:

  • a void



95
96
97
# File 'lib/models/unified_role_management_policy.rb', line 95

def effective_rules=(value)
    @effective_rules = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/models/unified_role_management_policy.rb', line 102

def get_field_deserializers()
    return super.merge({
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "effectiveRules" => lambda {|n| @effective_rules = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UnifiedRoleManagementPolicyRule.create_from_discriminator_value(pn) }) },
        "isOrganizationDefault" => lambda {|n| @is_organization_default = n.get_boolean_value() },
        "lastModifiedBy" => lambda {|n| @last_modified_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Identity.create_from_discriminator_value(pn) }) },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "rules" => lambda {|n| @rules = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UnifiedRoleManagementPolicyRule.create_from_discriminator_value(pn) }) },
        "scopeId" => lambda {|n| @scope_id = n.get_string_value() },
        "scopeType" => lambda {|n| @scope_type = n.get_string_value() },
    })
end

#is_organization_defaultObject

Gets the isOrganizationDefault property value. This can only be set to true for a single tenant-wide policy which will apply to all scopes and roles. Set the scopeId to / and scopeType to Directory. Supports $filter (eq, ne).

Returns:

  • a boolean



119
120
121
# File 'lib/models/unified_role_management_policy.rb', line 119

def is_organization_default
    return @is_organization_default
end

#is_organization_default=(value) ⇒ Object

Sets the isOrganizationDefault property value. This can only be set to true for a single tenant-wide policy which will apply to all scopes and roles. Set the scopeId to / and scopeType to Directory. Supports $filter (eq, ne).

Parameters:

  • value

    Value to set for the isOrganizationDefault property.

Returns:

  • a void



127
128
129
# File 'lib/models/unified_role_management_policy.rb', line 127

def is_organization_default=(value)
    @is_organization_default = value
end

#last_modified_byObject

Gets the lastModifiedBy property value. The identity who last modified the role setting.

Returns:

  • a identity



134
135
136
# File 'lib/models/unified_role_management_policy.rb', line 134

def last_modified_by
    return @last_modified_by
end

#last_modified_by=(value) ⇒ Object

Sets the lastModifiedBy property value. The identity who last modified the role setting.

Parameters:

  • value

    Value to set for the lastModifiedBy property.

Returns:

  • a void



142
143
144
# File 'lib/models/unified_role_management_policy.rb', line 142

def last_modified_by=(value)
    @last_modified_by = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The time when the role setting was last modified.

Returns:

  • a date_time



149
150
151
# File 'lib/models/unified_role_management_policy.rb', line 149

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The time when the role setting was last modified.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



157
158
159
# File 'lib/models/unified_role_management_policy.rb', line 157

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#rulesObject

Gets the rules property value. The collection of rules like approval rules and expiration rules. Supports $expand.

Returns:

  • a unified_role_management_policy_rule



164
165
166
# File 'lib/models/unified_role_management_policy.rb', line 164

def rules
    return @rules
end

#rules=(value) ⇒ Object

Sets the rules property value. The collection of rules like approval rules and expiration rules. Supports $expand.

Parameters:

  • value

    Value to set for the rules property.

Returns:

  • a void



172
173
174
# File 'lib/models/unified_role_management_policy.rb', line 172

def rules=(value)
    @rules = value
end

#scope_idObject

Gets the scopeId property value. The identifier of the scope where the policy is created. Can be / for the tenant or a group ID. Required.

Returns:

  • a string



179
180
181
# File 'lib/models/unified_role_management_policy.rb', line 179

def scope_id
    return @scope_id
end

#scope_id=(value) ⇒ Object

Sets the scopeId property value. The identifier of the scope where the policy is created. Can be / for the tenant or a group ID. Required.

Parameters:

  • value

    Value to set for the scopeId property.

Returns:

  • a void



187
188
189
# File 'lib/models/unified_role_management_policy.rb', line 187

def scope_id=(value)
    @scope_id = value
end

#scope_typeObject

Gets the scopeType property value. The type of the scope where the policy is created. One of Directory, DirectoryRole. Required.

Returns:

  • a string



194
195
196
# File 'lib/models/unified_role_management_policy.rb', line 194

def scope_type
    return @scope_type
end

#scope_type=(value) ⇒ Object

Sets the scopeType property value. The type of the scope where the policy is created. One of Directory, DirectoryRole. Required.

Parameters:

  • value

    Value to set for the scopeType property.

Returns:

  • a void



202
203
204
# File 'lib/models/unified_role_management_policy.rb', line 202

def scope_type=(value)
    @scope_type = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/models/unified_role_management_policy.rb', line 210

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_object_values("effectiveRules", @effective_rules)
    writer.write_boolean_value("isOrganizationDefault", @is_organization_default)
    writer.write_object_value("lastModifiedBy", @last_modified_by)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_collection_of_object_values("rules", @rules)
    writer.write_string_value("scopeId", @scope_id)
    writer.write_string_value("scopeType", @scope_type)
end