Class: MicrosoftGraph::Models::AccessPackageAssignment

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



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

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#access_packageObject

Gets the accessPackage property value. Read-only. Nullable. Supports $filter (eq) on the id property and $expand query parameters.

Returns:

  • a access_package



35
36
37
# File 'lib/models/access_package_assignment.rb', line 35

def access_package
    return @access_package
end

#access_package=(value) ⇒ Object

Sets the accessPackage property value. Read-only. Nullable. Supports $filter (eq) on the id property and $expand query parameters.

Parameters:

  • value

    Value to set for the access_package property.

Returns:

  • a void



43
44
45
# File 'lib/models/access_package_assignment.rb', line 43

def access_package=(value)
    @access_package = value
end

#assignment_policyObject

Gets the assignmentPolicy property value. Read-only. Supports $filter (eq) on the id property and $expand query parameters.

Returns:

  • a access_package_assignment_policy



50
51
52
# File 'lib/models/access_package_assignment.rb', line 50

def assignment_policy
    return @assignment_policy
end

#assignment_policy=(value) ⇒ Object

Sets the assignmentPolicy property value. Read-only. Supports $filter (eq) on the id property and $expand query parameters.

Parameters:

  • value

    Value to set for the assignment_policy property.

Returns:

  • a void



58
59
60
# File 'lib/models/access_package_assignment.rb', line 58

def assignment_policy=(value)
    @assignment_policy = value
end

#expired_date_timeObject

Gets the expiredDateTime 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



81
82
83
# File 'lib/models/access_package_assignment.rb', line 81

def expired_date_time
    return @expired_date_time
end

#expired_date_time=(value) ⇒ Object

Sets the expiredDateTime 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 expired_date_time property.

Returns:

  • a void



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

def expired_date_time=(value)
    @expired_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



96
97
98
99
100
101
102
103
104
105
106
# File 'lib/models/access_package_assignment.rb', line 96

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) }) },
        "assignmentPolicy" => lambda {|n| @assignment_policy = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageAssignmentPolicy.create_from_discriminator_value(pn) }) },
        "expiredDateTime" => lambda {|n| @expired_date_time = n.get_date_time_value() },
        "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::AccessPackageAssignmentState) },
        "status" => lambda {|n| @status = n.get_string_value() },
        "target" => lambda {|n| @target = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageSubject.create_from_discriminator_value(pn) }) },
    })
end

#scheduleObject

Gets the schedule property value. When the access assignment is to be in place. Read-only.

Returns:

  • a entitlement_management_schedule



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

def schedule
    return @schedule
end

#schedule=(value) ⇒ Object

Sets the schedule property value. When the access assignment is to be in place. Read-only.

Parameters:

  • value

    Value to set for the schedule property.

Returns:

  • a void



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

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)


127
128
129
130
131
132
133
134
135
136
137
# File 'lib/models/access_package_assignment.rb', line 127

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("accessPackage", @access_package)
    writer.write_object_value("assignmentPolicy", @assignment_policy)
    writer.write_date_time_value("expiredDateTime", @expired_date_time)
    writer.write_object_value("schedule", @schedule)
    writer.write_enum_value("state", @state)
    writer.write_string_value("status", @status)
    writer.write_object_value("target", @target)
end

#stateObject

Gets the state property value. The state of the access package assignment. The possible values are: delivering, partiallyDelivered, delivered, expired, deliveryFailed, unknownFutureValue. Read-only. Supports $filter (eq).

Returns:

  • a access_package_assignment_state



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

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. The state of the access package assignment. The possible values are: delivering, partiallyDelivered, delivered, expired, deliveryFailed, unknownFutureValue. Read-only. Supports $filter (eq).

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



150
151
152
# File 'lib/models/access_package_assignment.rb', line 150

def state=(value)
    @state = value
end

#statusObject

Gets the status property value. More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only.

Returns:

  • a string



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

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



165
166
167
# File 'lib/models/access_package_assignment.rb', line 165

def status=(value)
    @status = value
end

#targetObject

Gets the target property value. The subject of the access package assignment. Read-only. Nullable. Supports $expand. Supports $filter (eq) on objectId.

Returns:

  • a access_package_subject



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

def target
    return @target
end

#target=(value) ⇒ Object

Sets the target property value. The subject of the access package assignment. Read-only. Nullable. Supports $expand. Supports $filter (eq) on objectId.

Parameters:

  • value

    Value to set for the target property.

Returns:

  • a void



180
181
182
# File 'lib/models/access_package_assignment.rb', line 180

def target=(value)
    @target = value
end