Class: MicrosoftGraph::Models::OfferShiftRequest

Inherits:
ScheduleChangeRequest show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/offer_shift_request.rb

Direct Known Subclasses

SwapShiftsChangeRequest

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ScheduleChangeRequest

#assigned_to, #assigned_to=, #manager_action_date_time, #manager_action_date_time=, #manager_action_message, #manager_action_message=, #manager_user_id, #manager_user_id=, #sender_date_time, #sender_date_time=, #sender_message, #sender_message=, #sender_user_id, #sender_user_id=, #state, #state=

Methods inherited from ChangeTrackedEntity

#created_date_time, #created_date_time=, #last_modified_by, #last_modified_by=, #last_modified_date_time, #last_modified_date_time=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new offerShiftRequest and sets the default values.



26
27
28
29
# File 'lib/models/offer_shift_request.rb', line 26

def initialize()
    super
    @odata_type = "#microsoft.graph.offerShiftRequest"
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 offer_shift_request

Raises:

  • (StandardError)


35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/models/offer_shift_request.rb', line 35

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.swapShiftsChangeRequest"
                return SwapShiftsChangeRequest.new
        end
    end
    return OfferShiftRequest.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



51
52
53
54
55
56
57
58
# File 'lib/models/offer_shift_request.rb', line 51

def get_field_deserializers()
    return super.merge({
        "recipientActionDateTime" => lambda {|n| @recipient_action_date_time = n.get_date_time_value() },
        "recipientActionMessage" => lambda {|n| @recipient_action_message = n.get_string_value() },
        "recipientUserId" => lambda {|n| @recipient_user_id = n.get_string_value() },
        "senderShiftId" => lambda {|n| @sender_shift_id = n.get_string_value() },
    })
end

#recipient_action_date_timeObject

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



63
64
65
# File 'lib/models/offer_shift_request.rb', line 63

def recipient_action_date_time
    return @recipient_action_date_time
end

#recipient_action_date_time=(value) ⇒ Object

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

Returns:

  • a void



71
72
73
# File 'lib/models/offer_shift_request.rb', line 71

def recipient_action_date_time=(value)
    @recipient_action_date_time = value
end

#recipient_action_messageObject

Gets the recipientActionMessage property value. Custom message sent by recipient of the offer shift request.

Returns:

  • a string



78
79
80
# File 'lib/models/offer_shift_request.rb', line 78

def recipient_action_message
    return @recipient_action_message
end

#recipient_action_message=(value) ⇒ Object

Sets the recipientActionMessage property value. Custom message sent by recipient of the offer shift request.

Parameters:

  • value

    Value to set for the recipientActionMessage property.

Returns:

  • a void



86
87
88
# File 'lib/models/offer_shift_request.rb', line 86

def recipient_action_message=(value)
    @recipient_action_message = value
end

#recipient_user_idObject

Gets the recipientUserId property value. User ID of the recipient of the offer shift request.

Returns:

  • a string



93
94
95
# File 'lib/models/offer_shift_request.rb', line 93

def recipient_user_id
    return @recipient_user_id
end

#recipient_user_id=(value) ⇒ Object

Sets the recipientUserId property value. User ID of the recipient of the offer shift request.

Parameters:

  • value

    Value to set for the recipientUserId property.

Returns:

  • a void



101
102
103
# File 'lib/models/offer_shift_request.rb', line 101

def recipient_user_id=(value)
    @recipient_user_id = value
end

#sender_shift_idObject

Gets the senderShiftId property value. User ID of the sender of the offer shift request.

Returns:

  • a string



108
109
110
# File 'lib/models/offer_shift_request.rb', line 108

def sender_shift_id
    return @sender_shift_id
end

#sender_shift_id=(value) ⇒ Object

Sets the senderShiftId property value. User ID of the sender of the offer shift request.

Parameters:

  • value

    Value to set for the senderShiftId property.

Returns:

  • a void



116
117
118
# File 'lib/models/offer_shift_request.rb', line 116

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


124
125
126
127
128
129
130
# File 'lib/models/offer_shift_request.rb', line 124

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("recipientActionMessage", @recipient_action_message)
    writer.write_string_value("recipientUserId", @recipient_user_id)
    writer.write_string_value("senderShiftId", @sender_shift_id)
end