Class: MicrosoftGraph::Models::AccessPackageResourceRoleScope

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



23
24
25
# File 'lib/models/access_package_resource_role_scope.rb', line 23

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 access_package_resource_role_scope

Raises:

  • (StandardError)


46
47
48
49
# File 'lib/models/access_package_resource_role_scope.rb', line 46

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

Instance Method Details

#created_date_timeObject

Gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Returns:

  • a date_time



30
31
32
# File 'lib/models/access_package_resource_role_scope.rb', line 30

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



38
39
40
# File 'lib/models/access_package_resource_role_scope.rb', line 38

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



54
55
56
57
58
59
60
# File 'lib/models/access_package_resource_role_scope.rb', line 54

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "role" => lambda {|n| @role = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageResourceRole.create_from_discriminator_value(pn) }) },
        "scope" => lambda {|n| @scope = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageResourceScope.create_from_discriminator_value(pn) }) },
    })
end

#roleObject

Gets the role property value. The role property

Returns:

  • a access_package_resource_role



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

def role
    return @role
end

#role=(value) ⇒ Object

Sets the role property value. The role property

Parameters:

  • value

    Value to set for the role property.

Returns:

  • a void



73
74
75
# File 'lib/models/access_package_resource_role_scope.rb', line 73

def role=(value)
    @role = value
end

#scopeObject

Gets the scope property value. The scope property

Returns:

  • a access_package_resource_scope



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

def scope
    return @scope
end

#scope=(value) ⇒ Object

Sets the scope property value. The scope property

Parameters:

  • value

    Value to set for the scope property.

Returns:

  • a void



88
89
90
# File 'lib/models/access_package_resource_role_scope.rb', line 88

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


96
97
98
99
100
101
102
# File 'lib/models/access_package_resource_role_scope.rb', line 96

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_object_value("role", @role)
    writer.write_object_value("scope", @scope)
end