Class: MicrosoftGraph::Models::AccessPackageAssignmentRequest

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



104
105
106
# File 'lib/models/access_package_assignment_request.rb', line 104

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_assignment_request

Raises:

  • (StandardError)


127
128
129
130
# File 'lib/models/access_package_assignment_request.rb', line 127

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

Instance Method Details

#access_packageObject

Gets the accessPackage property value. The access package associated with the accessPackageAssignmentRequest. An access package defines the collections of resource roles and the policies for how one or more users can get access to those resources. Read-only. Nullable. Supports $expand.

Returns:

  • a access_package



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

def access_package
    return @access_package
end

#access_package=(value) ⇒ Object

Sets the accessPackage property value. The access package associated with the accessPackageAssignmentRequest. An access package defines the collections of resource roles and the policies for how one or more users can get access to those resources. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the access_package property.

Returns:

  • a void



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

def access_package=(value)
    @access_package = value
end

#answersObject

Gets the answers property value. Answers provided by the requestor to accessPackageQuestions asked of them at the time of request.

Returns:

  • a access_package_answer



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

def answers
    return @answers
end

#answers=(value) ⇒ Object

Sets the answers property value. Answers provided by the requestor to accessPackageQuestions asked of them at the time of request.

Parameters:

  • value

    Value to set for the answers property.

Returns:

  • a void



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

def answers=(value)
    @answers = value
end

#assignmentObject

Gets the assignment property value. For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand.

Returns:

  • a access_package_assignment



74
75
76
# File 'lib/models/access_package_assignment_request.rb', line 74

def assignment
    return @assignment
end

#assignment=(value) ⇒ Object

Sets the assignment property value. For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand.

Parameters:

  • value

    Value to set for the assignment property.

Returns:

  • a void



82
83
84
# File 'lib/models/access_package_assignment_request.rb', line 82

def assignment=(value)
    @assignment = value
end

#completed_date_timeObject

Gets the completedDateTime property value. The date of the end of processing, either successful or failure, of a request. 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



89
90
91
# File 'lib/models/access_package_assignment_request.rb', line 89

def completed_date_time
    return @completed_date_time
end

#completed_date_time=(value) ⇒ Object

Sets the completedDateTime property value. The date of the end of processing, either successful or failure, of a request. 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 completed_date_time property.

Returns:

  • a void



97
98
99
# File 'lib/models/access_package_assignment_request.rb', line 97

def completed_date_time=(value)
    @completed_date_time = 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. Supports $filter.

Returns:

  • a date_time



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

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. Supports $filter.

Parameters:

  • value

    Value to set for the created_date_time property.

Returns:

  • a void



119
120
121
# File 'lib/models/access_package_assignment_request.rb', line 119

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/models/access_package_assignment_request.rb', line 135

def get_field_deserializers()
    return super.merge({
        "accessPackage" => lambda {|n| @access_package = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackage.create_from_discriminator_value(pn) }) },
        "answers" => lambda {|n| @answers = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessPackageAnswer.create_from_discriminator_value(pn) }) },
        "assignment" => lambda {|n| @assignment = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageAssignment.create_from_discriminator_value(pn) }) },
        "completedDateTime" => lambda {|n| @completed_date_time = n.get_date_time_value() },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "requestType" => lambda {|n| @request_type = n.get_enum_value(MicrosoftGraph::Models::AccessPackageRequestType) },
        "requestor" => lambda {|n| @requestor = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageSubject.create_from_discriminator_value(pn) }) },
        "schedule" => lambda {|n| @schedule = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::EntitlementManagementSchedule.create_from_discriminator_value(pn) }) },
        "state" => lambda {|n| @state = n.get_enum_value(MicrosoftGraph::Models::AccessPackageRequestState) },
        "status" => lambda {|n| @status = n.get_string_value() },
    })
end

#request_typeObject

Gets the requestType property value. The type of the request. The possible values are: notSpecified, userAdd, UserExtend, userUpdate, userRemove, adminAdd, adminUpdate, adminRemove, systemAdd, systemUpdate, systemRemove, onBehalfAdd (not supported), unknownFutureValue. A request from the user themselves would have requestType of userAdd, userUpdate or userRemove. This property cannot be changed once set.

Returns:

  • a access_package_request_type



153
154
155
# File 'lib/models/access_package_assignment_request.rb', line 153

def request_type
    return @request_type
end

#request_type=(value) ⇒ Object

Sets the requestType property value. The type of the request. The possible values are: notSpecified, userAdd, UserExtend, userUpdate, userRemove, adminAdd, adminUpdate, adminRemove, systemAdd, systemUpdate, systemRemove, onBehalfAdd (not supported), unknownFutureValue. A request from the user themselves would have requestType of userAdd, userUpdate or userRemove. This property cannot be changed once set.

Parameters:

  • value

    Value to set for the request_type property.

Returns:

  • a void



161
162
163
# File 'lib/models/access_package_assignment_request.rb', line 161

def request_type=(value)
    @request_type = value
end

#requestorObject

Gets the requestor property value. The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand.

Returns:

  • a access_package_subject



168
169
170
# File 'lib/models/access_package_assignment_request.rb', line 168

def requestor
    return @requestor
end

#requestor=(value) ⇒ Object

Sets the requestor property value. The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the requestor property.

Returns:

  • a void



176
177
178
# File 'lib/models/access_package_assignment_request.rb', line 176

def requestor=(value)
    @requestor = value
end

#scheduleObject

Gets the schedule property value. The range of dates that access is to be assigned to the requestor. This property cannot be changed once set.

Returns:

  • a entitlement_management_schedule



183
184
185
# File 'lib/models/access_package_assignment_request.rb', line 183

def schedule
    return @schedule
end

#schedule=(value) ⇒ Object

Sets the schedule property value. The range of dates that access is to be assigned to the requestor. This property cannot be changed once set.

Parameters:

  • value

    Value to set for the schedule property.

Returns:

  • a void



191
192
193
# File 'lib/models/access_package_assignment_request.rb', line 191

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


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("accessPackage", @access_package)
    writer.write_collection_of_object_values("answers", @answers)
    writer.write_object_value("assignment", @assignment)
    writer.write_date_time_value("completedDateTime", @completed_date_time)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_enum_value("requestType", @request_type)
    writer.write_object_value("requestor", @requestor)
    writer.write_object_value("schedule", @schedule)
    writer.write_enum_value("state", @state)
    writer.write_string_value("status", @status)
end

#stateObject

Gets the state property value. The state of the request. The possible values are: submitted, pendingApproval, delivering, delivered, deliveryFailed, denied, scheduled, canceled, partiallyDelivered, unknownFutureValue. Read-only. Supports $filter (eq).

Returns:

  • a access_package_request_state



217
218
219
# File 'lib/models/access_package_assignment_request.rb', line 217

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. The state of the request. The possible values are: submitted, pendingApproval, delivering, delivered, deliveryFailed, denied, scheduled, canceled, partiallyDelivered, unknownFutureValue. Read-only. Supports $filter (eq).

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



225
226
227
# File 'lib/models/access_package_assignment_request.rb', line 225

def state=(value)
    @state = value
end

#statusObject

Gets the status property value. More information on the request processing status. Read-only.

Returns:

  • a string



232
233
234
# File 'lib/models/access_package_assignment_request.rb', line 232

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. More information on the request processing status. Read-only.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



240
241
242
# File 'lib/models/access_package_assignment_request.rb', line 240

def status=(value)
    @status = value
end