Class: MicrosoftGraph::Models::UnifiedRoleScheduleInstanceBase

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



67
68
69
# File 'lib/models/unified_role_schedule_instance_base.rb', line 67

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_schedule_instance_base

Raises:

  • (StandardError)


75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/models/unified_role_schedule_instance_base.rb', line 75

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.unifiedRoleAssignmentScheduleInstance"
                return UnifiedRoleAssignmentScheduleInstance.new
            when "#microsoft.graph.unifiedRoleEligibilityScheduleInstance"
                return UnifiedRoleEligibilityScheduleInstance.new
        end
    end
    return UnifiedRoleScheduleInstanceBase.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 or role eligibility is scoped to an app. Nullable.

Returns:

  • a app_scope



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

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 or role eligibility is scoped to an app. Nullable.

Parameters:

  • value

    Value to set for the appScope property.

Returns:

  • a void



45
46
47
# File 'lib/models/unified_role_schedule_instance_base.rb', line 45

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 or role eligibility is scoped to an app. The scope of an assignment or role eligibility determines the set of resources for which the principal has been granted access. 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.

Returns:

  • a string



52
53
54
# File 'lib/models/unified_role_schedule_instance_base.rb', line 52

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 or role eligibility is scoped to an app. The scope of an assignment or role eligibility determines the set of resources for which the principal has been granted access. 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.

Parameters:

  • value

    Value to set for the appScopeId property.

Returns:

  • a void



60
61
62
# File 'lib/models/unified_role_schedule_instance_base.rb', line 60

def app_scope_id=(value)
    @app_scope_id = value
end

#directory_scopeObject

Gets the directoryScope property value. The directory object that is the scope of the assignment or role eligibility. Read-only.

Returns:

  • a directory_object



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

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 or role eligibility. Read-only.

Parameters:

  • value

    Value to set for the directoryScope property.

Returns:

  • a void



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

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 or role eligibility. The scope of an assignment or role eligibility 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.

Returns:

  • a string



108
109
110
# File 'lib/models/unified_role_schedule_instance_base.rb', line 108

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 or role eligibility. The scope of an assignment or role eligibility 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.

Parameters:

  • value

    Value to set for the directoryScopeId property.

Returns:

  • a void



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

def directory_scope_id=(value)
    @directory_scope_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/models/unified_role_schedule_instance_base.rb', line 123

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() },
        "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. The principal that’s getting a role assignment or role eligibility through the request.

Returns:

  • a directory_object



139
140
141
# File 'lib/models/unified_role_schedule_instance_base.rb', line 139

def principal
    return @principal
end

#principal=(value) ⇒ Object

Sets the principal property value. The principal that’s getting a role assignment or role eligibility through the request.

Parameters:

  • value

    Value to set for the principal property.

Returns:

  • a void



147
148
149
# File 'lib/models/unified_role_schedule_instance_base.rb', line 147

def principal=(value)
    @principal = value
end

#principal_idObject

Gets the principalId property value. Identifier of the principal that has been granted the role assignment or that’s eligible for a role.

Returns:

  • a string



154
155
156
# File 'lib/models/unified_role_schedule_instance_base.rb', line 154

def principal_id
    return @principal_id
end

#principal_id=(value) ⇒ Object

Sets the principalId property value. Identifier of the principal that has been granted the role assignment or that’s eligible for a role.

Parameters:

  • value

    Value to set for the principalId property.

Returns:

  • a void



162
163
164
# File 'lib/models/unified_role_schedule_instance_base.rb', line 162

def principal_id=(value)
    @principal_id = value
end

#role_definitionObject

Gets the roleDefinition property value. Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property.

Returns:

  • a unified_role_definition



169
170
171
# File 'lib/models/unified_role_schedule_instance_base.rb', line 169

def role_definition
    return @role_definition
end

#role_definition=(value) ⇒ Object

Sets the roleDefinition property value. Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property.

Parameters:

  • value

    Value to set for the roleDefinition property.

Returns:

  • a void



177
178
179
# File 'lib/models/unified_role_schedule_instance_base.rb', line 177

def role_definition=(value)
    @role_definition = value
end

#role_definition_idObject

Gets the roleDefinitionId property value. Identifier of the unifiedRoleDefinition object that is being assigned to the principal or that the principal is eligible for.

Returns:

  • a string



184
185
186
# File 'lib/models/unified_role_schedule_instance_base.rb', line 184

def role_definition_id
    return @role_definition_id
end

#role_definition_id=(value) ⇒ Object

Sets the roleDefinitionId property value. Identifier of the unifiedRoleDefinition object that is being assigned to the principal or that the principal is eligible for.

Parameters:

  • value

    Value to set for the roleDefinitionId property.

Returns:

  • a void



192
193
194
# File 'lib/models/unified_role_schedule_instance_base.rb', line 192

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)


200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/models/unified_role_schedule_instance_base.rb', line 200

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_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