Class: MicrosoftGraph::Models::UnifiedRoleManagementPolicyAssignment

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/unified_role_management_policy_assignment.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 unifiedRoleManagementPolicyAssignment and sets the default values.



28
29
30
# File 'lib/models/unified_role_management_policy_assignment.rb', line 28

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_assignment

Raises:

  • (StandardError)


36
37
38
39
# File 'lib/models/unified_role_management_policy_assignment.rb', line 36

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



44
45
46
47
48
49
50
51
52
# File 'lib/models/unified_role_management_policy_assignment.rb', line 44

def get_field_deserializers()
    return super.merge({
        "policy" => lambda {|n| @policy = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::UnifiedRoleManagementPolicy.create_from_discriminator_value(pn) }) },
        "policyId" => lambda {|n| @policy_id = n.get_string_value() },
        "roleDefinitionId" => lambda {|n| @role_definition_id = n.get_string_value() },
        "scopeId" => lambda {|n| @scope_id = n.get_string_value() },
        "scopeType" => lambda {|n| @scope_type = n.get_string_value() },
    })
end

#policyObject

Gets the policy property value. The policy that’s associated with a policy assignment. Supports $expand and a nested $expand of the rules and effectiveRules relationships for the policy.

Returns:

  • a unified_role_management_policy



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

def policy
    return @policy
end

#policy=(value) ⇒ Object

Sets the policy property value. The policy that’s associated with a policy assignment. Supports $expand and a nested $expand of the rules and effectiveRules relationships for the policy.

Parameters:

  • value

    Value to set for the policy property.

Returns:

  • a void



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

def policy=(value)
    @policy = value
end

#policy_idObject

Gets the policyId property value. The id of the policy. Inherited from entity.

Returns:

  • a string



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

def policy_id
    return @policy_id
end

#policy_id=(value) ⇒ Object

Sets the policyId property value. The id of the policy. Inherited from entity.

Parameters:

  • value

    Value to set for the policyId property.

Returns:

  • a void



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

def policy_id=(value)
    @policy_id = value
end

#role_definition_idObject

Gets the roleDefinitionId property value. The identifier of the role definition object where the policy applies. If not specified, the policy applies to all roles. Supports $filter (eq).

Returns:

  • a string



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

def role_definition_id
    return @role_definition_id
end

#role_definition_id=(value) ⇒ Object

Sets the roleDefinitionId property value. The identifier of the role definition object where the policy applies. If not specified, the policy applies to all roles. Supports $filter (eq).

Parameters:

  • value

    Value to set for the roleDefinitionId property.

Returns:

  • a void



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

def role_definition_id=(value)
    @role_definition_id = value
end

#scope_idObject

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

Returns:

  • a string



102
103
104
# File 'lib/models/unified_role_management_policy_assignment.rb', line 102

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 assigned. Can be / for the tenant or a group ID. Required.

Parameters:

  • value

    Value to set for the scopeId property.

Returns:

  • a void



110
111
112
# File 'lib/models/unified_role_management_policy_assignment.rb', line 110

def scope_id=(value)
    @scope_id = value
end

#scope_typeObject

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

Returns:

  • a string



117
118
119
# File 'lib/models/unified_role_management_policy_assignment.rb', line 117

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 assigned. One of Directory, DirectoryRole. Required.

Parameters:

  • value

    Value to set for the scopeType property.

Returns:

  • a void



125
126
127
# File 'lib/models/unified_role_management_policy_assignment.rb', line 125

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)


133
134
135
136
137
138
139
140
141
# File 'lib/models/unified_role_management_policy_assignment.rb', line 133

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("policy", @policy)
    writer.write_string_value("policyId", @policy_id)
    writer.write_string_value("roleDefinitionId", @role_definition_id)
    writer.write_string_value("scopeId", @scope_id)
    writer.write_string_value("scopeType", @scope_type)
end