Class: MicrosoftGraph::Models::AccessPackageResource

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



41
42
43
# File 'lib/models/access_package_resource.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 access_package_resource

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return AccessPackageResource.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. Read-only.

Returns:

  • a date_time



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

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. Read-only.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



56
57
58
# File 'lib/models/access_package_resource.rb', line 56

def created_date_time=(value)
    @created_date_time = value
end

#descriptionObject

Gets the description property value. A description for the resource.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. A description for the resource.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. The display name of the resource, such as the application name, group name or site name.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The display name of the resource, such as the application name, group name or site name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#environmentObject

Gets the environment property value. Contains the environment information for the resource. This can be set using either the @odata.bind annotation or the environment’s originId.Supports $expand.

Returns:

  • a access_package_resource_environment



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

def environment
    return @environment
end

#environment=(value) ⇒ Object

Sets the environment property value. Contains the environment information for the resource. This can be set using either the @odata.bind annotation or the environment’s originId.Supports $expand.

Parameters:

  • value

    Value to set for the environment property.

Returns:

  • a void



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

def environment=(value)
    @environment = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/models/access_package_resource.rb', line 117

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "environment" => lambda {|n| @environment = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageResourceEnvironment.create_from_discriminator_value(pn) }) },
        "modifiedDateTime" => lambda {|n| @modified_date_time = n.get_date_time_value() },
        "originId" => lambda {|n| @origin_id = n.get_string_value() },
        "originSystem" => lambda {|n| @origin_system = n.get_string_value() },
        "roles" => lambda {|n| @roles = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessPackageResourceRole.create_from_discriminator_value(pn) }) },
        "scopes" => lambda {|n| @scopes = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessPackageResourceScope.create_from_discriminator_value(pn) }) },
    })
end

#modified_date_timeObject

Gets the modifiedDateTime 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. Read-only.

Returns:

  • a date_time



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

def modified_date_time
    return @modified_date_time
end

#modified_date_time=(value) ⇒ Object

Sets the modifiedDateTime 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. Read-only.

Parameters:

  • value

    Value to set for the modifiedDateTime property.

Returns:

  • a void



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

def modified_date_time=(value)
    @modified_date_time = value
end

#origin_idObject

Gets the originId property value. The unique identifier of the resource in the origin system. In the case of an Azure AD group, this is the identifier of the group.

Returns:

  • a string



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

def origin_id
    return @origin_id
end

#origin_id=(value) ⇒ Object

Sets the originId property value. The unique identifier of the resource in the origin system. In the case of an Azure AD group, this is the identifier of the group.

Parameters:

  • value

    Value to set for the originId property.

Returns:

  • a void



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

def origin_id=(value)
    @origin_id = value
end

#origin_systemObject

Gets the originSystem property value. The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup.

Returns:

  • a string



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

def origin_system
    return @origin_system
end

#origin_system=(value) ⇒ Object

Sets the originSystem property value. The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup.

Parameters:

  • value

    Value to set for the originSystem property.

Returns:

  • a void



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

def origin_system=(value)
    @origin_system = value
end

#rolesObject

Gets the roles property value. Read-only. Nullable. Supports $expand.

Returns:

  • a access_package_resource_role



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

def roles
    return @roles
end

#roles=(value) ⇒ Object

Sets the roles property value. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the roles property.

Returns:

  • a void



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

def roles=(value)
    @roles = value
end

#scopesObject

Gets the scopes property value. Read-only. Nullable. Supports $expand.

Returns:

  • a access_package_resource_scope



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

def scopes
    return @scopes
end

#scopes=(value) ⇒ Object

Sets the scopes property value. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the scopes property.

Returns:

  • a void



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

def scopes=(value)
    @scopes = 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/access_package_resource.rb', line 210

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_object_value("environment", @environment)
    writer.write_date_time_value("modifiedDateTime", @modified_date_time)
    writer.write_string_value("originId", @origin_id)
    writer.write_string_value("originSystem", @origin_system)
    writer.write_collection_of_object_values("roles", @roles)
    writer.write_collection_of_object_values("scopes", @scopes)
end