Class: MicrosoftGraph::Models::UnifiedRoleAssignment

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



85
86
87
# File 'lib/models/unified_role_assignment.rb', line 85

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_assignment

Raises:

  • (StandardError)


93
94
95
96
# File 'lib/models/unified_role_assignment.rb', line 93

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

Instance Method Details

#app_scopeObject

Gets the appScope property value. Read-only property with details of the app specific scope when the assignment scope is app specific. Containment entity. Supports $expand.

Returns:

  • a app_scope



40
41
42
# File 'lib/models/unified_role_assignment.rb', line 40

def app_scope
    return @app_scope
end

#app_scope=(value) ⇒ Object

Sets the appScope property value. Read-only property with details of the app specific scope when the assignment scope is app specific. Containment entity. Supports $expand.

Parameters:

  • value

    Value to set for the appScope property.

Returns:

  • a void



48
49
50
# File 'lib/models/unified_role_assignment.rb', line 48

def app_scope=(value)
    @app_scope = value
end

#app_scope_idObject

Gets the appScopeId property value. Identifier of the app-specific scope when the assignment scope is app-specific. Either this property or directoryScopeId is required. App scopes are scopes that are defined and understood by this application only. Use / for tenant-wide app scopes. Use directoryScopeId to limit the scope to particular directory objects, for example, administrative units. Supports $filter (eq, in).

Returns:

  • a string



55
56
57
# File 'lib/models/unified_role_assignment.rb', line 55

def app_scope_id
    return @app_scope_id
end

#app_scope_id=(value) ⇒ Object

Sets the appScopeId property value. Identifier of the app-specific scope when the assignment scope is app-specific. Either this property or directoryScopeId is required. App scopes are scopes that are defined and understood by this application only. Use / for tenant-wide app scopes. Use directoryScopeId to limit the scope to particular directory objects, for example, administrative units. Supports $filter (eq, in).

Parameters:

  • value

    Value to set for the appScopeId property.

Returns:

  • a void



63
64
65
# File 'lib/models/unified_role_assignment.rb', line 63

def app_scope_id=(value)
    @app_scope_id = value
end

#conditionObject

Gets the condition property value. The condition property

Returns:

  • a string



70
71
72
# File 'lib/models/unified_role_assignment.rb', line 70

def condition
    return @condition
end

#condition=(value) ⇒ Object

Sets the condition property value. The condition property

Parameters:

  • value

    Value to set for the condition property.

Returns:

  • a void



78
79
80
# File 'lib/models/unified_role_assignment.rb', line 78

def condition=(value)
    @condition = value
end

#directory_scopeObject

Gets the directoryScope property value. The directory object that is the scope of the assignment. Read-only. Supports $expand.

Returns:

  • a directory_object



101
102
103
# File 'lib/models/unified_role_assignment.rb', line 101

def directory_scope
    return @directory_scope
end

#directory_scope=(value) ⇒ Object

Sets the directoryScope property value. The directory object that is the scope of the assignment. Read-only. Supports $expand.

Parameters:

  • value

    Value to set for the directoryScope property.

Returns:

  • a void



109
110
111
# File 'lib/models/unified_role_assignment.rb', line 109

def directory_scope=(value)
    @directory_scope = value
end

#directory_scope_idObject

Gets the directoryScopeId property value. Identifier of the directory object representing the scope of the assignment. Either this property or appScopeId is required. The scope of an assignment determines the set of resources for which the principal has been granted access. Directory scopes are shared scopes stored in the directory that are understood by multiple applications. Use / for tenant-wide scope. Use appScopeId to limit the scope to an application only. Supports $filter (eq, in).

Returns:

  • a string



116
117
118
# File 'lib/models/unified_role_assignment.rb', line 116

def directory_scope_id
    return @directory_scope_id
end

#directory_scope_id=(value) ⇒ Object

Sets the directoryScopeId property value. Identifier of the directory object representing the scope of the assignment. Either this property or appScopeId is required. The scope of an assignment determines the set of resources for which the principal has been granted access. Directory scopes are shared scopes stored in the directory that are understood by multiple applications. Use / for tenant-wide scope. Use appScopeId to limit the scope to an application only. Supports $filter (eq, in).

Parameters:

  • value

    Value to set for the directoryScopeId property.

Returns:

  • a void



124
125
126
# File 'lib/models/unified_role_assignment.rb', line 124

def directory_scope_id=(value)
    @directory_scope_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/models/unified_role_assignment.rb', line 131

def get_field_deserializers()
    return super.merge({
        "appScope" => lambda {|n| @app_scope = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AppScope.create_from_discriminator_value(pn) }) },
        "appScopeId" => lambda {|n| @app_scope_id = n.get_string_value() },
        "condition" => lambda {|n| @condition = n.get_string_value() },
        "directoryScope" => lambda {|n| @directory_scope = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
        "directoryScopeId" => lambda {|n| @directory_scope_id = n.get_string_value() },
        "principal" => lambda {|n| @principal = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
        "principalId" => lambda {|n| @principal_id = n.get_string_value() },
        "roleDefinition" => lambda {|n| @role_definition = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::UnifiedRoleDefinition.create_from_discriminator_value(pn) }) },
        "roleDefinitionId" => lambda {|n| @role_definition_id = n.get_string_value() },
    })
end

#principalObject

Gets the principal property value. Referencing the assigned principal. Read-only. Supports $expand.

Returns:

  • a directory_object



148
149
150
# File 'lib/models/unified_role_assignment.rb', line 148

def principal
    return @principal
end

#principal=(value) ⇒ Object

Sets the principal property value. Referencing the assigned principal. Read-only. Supports $expand.

Parameters:

  • value

    Value to set for the principal property.

Returns:

  • a void



156
157
158
# File 'lib/models/unified_role_assignment.rb', line 156

def principal=(value)
    @principal = value
end

#principal_idObject

Gets the principalId property value. Identifier of the principal to which the assignment is granted. Supports $filter (eq, in).

Returns:

  • a string



163
164
165
# File 'lib/models/unified_role_assignment.rb', line 163

def principal_id
    return @principal_id
end

#principal_id=(value) ⇒ Object

Sets the principalId property value. Identifier of the principal to which the assignment is granted. Supports $filter (eq, in).

Parameters:

  • value

    Value to set for the principalId property.

Returns:

  • a void



171
172
173
# File 'lib/models/unified_role_assignment.rb', line 171

def principal_id=(value)
    @principal_id = value
end

#role_definitionObject

Gets the roleDefinition property value. The roleDefinition the assignment is for. Supports $expand. roleDefinition.Id will be auto expanded.

Returns:

  • a unified_role_definition



178
179
180
# File 'lib/models/unified_role_assignment.rb', line 178

def role_definition
    return @role_definition
end

#role_definition=(value) ⇒ Object

Sets the roleDefinition property value. The roleDefinition the assignment is for. Supports $expand. roleDefinition.Id will be auto expanded.

Parameters:

  • value

    Value to set for the roleDefinition property.

Returns:

  • a void



186
187
188
# File 'lib/models/unified_role_assignment.rb', line 186

def role_definition=(value)
    @role_definition = value
end

#role_definition_idObject

Gets the roleDefinitionId property value. Identifier of the role definition the assignment is for. Read only. Supports $filter (eq, in).

Returns:

  • a string



193
194
195
# File 'lib/models/unified_role_assignment.rb', line 193

def role_definition_id
    return @role_definition_id
end

#role_definition_id=(value) ⇒ Object

Sets the roleDefinitionId property value. Identifier of the role definition the assignment is for. Read only. Supports $filter (eq, in).

Parameters:

  • value

    Value to set for the roleDefinitionId property.

Returns:

  • a void



201
202
203
# File 'lib/models/unified_role_assignment.rb', line 201

def role_definition_id=(value)
    @role_definition_id = 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)


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("appScope", @app_scope)
    writer.write_string_value("appScopeId", @app_scope_id)
    writer.write_string_value("condition", @condition)
    writer.write_object_value("directoryScope", @directory_scope)
    writer.write_string_value("directoryScopeId", @directory_scope_id)
    writer.write_object_value("principal", @principal)
    writer.write_string_value("principalId", @principal_id)
    writer.write_object_value("roleDefinition", @role_definition)
    writer.write_string_value("roleDefinitionId", @role_definition_id)
end