Class: MicrosoftGraph::Models::AccessPackageResourceRequest

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



44
45
46
# File 'lib/models/access_package_resource_request.rb', line 44

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_request

Raises:

  • (StandardError)


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

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

Instance Method Details

#catalogObject

Gets the catalog property value. The catalog property

Returns:

  • a access_package_catalog



29
30
31
# File 'lib/models/access_package_resource_request.rb', line 29

def catalog
    return @catalog
end

#catalog=(value) ⇒ Object

Sets the catalog property value. The catalog property

Parameters:

  • value

    Value to set for the catalog property.

Returns:

  • a void



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

def catalog=(value)
    @catalog = value
end

#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



51
52
53
# File 'lib/models/access_package_resource_request.rb', line 51

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



59
60
61
# File 'lib/models/access_package_resource_request.rb', line 59

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



75
76
77
78
79
80
81
82
83
# File 'lib/models/access_package_resource_request.rb', line 75

def get_field_deserializers()
    return super.merge({
        "catalog" => lambda {|n| @catalog = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageCatalog.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "requestType" => lambda {|n| @request_type = n.get_enum_value(MicrosoftGraph::Models::AccessPackageRequestType) },
        "resource" => lambda {|n| @resource = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageResource.create_from_discriminator_value(pn) }) },
        "state" => lambda {|n| @state = n.get_enum_value(MicrosoftGraph::Models::AccessPackageRequestState) },
    })
end

#request_typeObject

Gets the requestType property value. The type of the request. Use adminAdd to add a resource, if the caller is an administrator or resource owner, adminUpdate to update a resource, or adminRemove to remove a resource.

Returns:

  • a access_package_request_type



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

def request_type
    return @request_type
end

#request_type=(value) ⇒ Object

Sets the requestType property value. The type of the request. Use adminAdd to add a resource, if the caller is an administrator or resource owner, adminUpdate to update a resource, or adminRemove to remove a resource.

Parameters:

  • value

    Value to set for the requestType property.

Returns:

  • a void



96
97
98
# File 'lib/models/access_package_resource_request.rb', line 96

def request_type=(value)
    @request_type = value
end

#resourceObject

Gets the resource property value. The resource property

Returns:

  • a access_package_resource



103
104
105
# File 'lib/models/access_package_resource_request.rb', line 103

def resource
    return @resource
end

#resource=(value) ⇒ Object

Sets the resource property value. The resource property

Parameters:

  • value

    Value to set for the resource property.

Returns:

  • a void



111
112
113
# File 'lib/models/access_package_resource_request.rb', line 111

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


119
120
121
122
123
124
125
126
127
# File 'lib/models/access_package_resource_request.rb', line 119

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("catalog", @catalog)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_enum_value("requestType", @request_type)
    writer.write_object_value("resource", @resource)
    writer.write_enum_value("state", @state)
end

#stateObject

Gets the state property value. The outcome of whether the service was able to add the resource to the catalog. The value is delivered if the resource was added or removed. Read-only.

Returns:

  • a access_package_request_state



132
133
134
# File 'lib/models/access_package_resource_request.rb', line 132

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. The outcome of whether the service was able to add the resource to the catalog. The value is delivered if the resource was added or removed. Read-only.

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



140
141
142
# File 'lib/models/access_package_resource_request.rb', line 140

def state=(value)
    @state = value
end