Class: MicrosoftGraph::Models::SwapShiftsChangeRequest

Inherits:
OfferShiftRequest show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/swap_shifts_change_request.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OfferShiftRequest

#recipient_action_date_time, #recipient_action_date_time=, #recipient_action_message, #recipient_action_message=, #recipient_user_id, #recipient_user_id=, #sender_shift_id, #sender_shift_id=

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 swapShiftsChangeRequest and sets the default values.



16
17
18
19
# File 'lib/models/swap_shifts_change_request.rb', line 16

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

Raises:

  • (StandardError)


25
26
27
28
# File 'lib/models/swap_shifts_change_request.rb', line 25

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



33
34
35
36
37
# File 'lib/models/swap_shifts_change_request.rb', line 33

def get_field_deserializers()
    return super.merge({
        "recipientShiftId" => lambda {|n| @recipient_shift_id = n.get_string_value() },
    })
end

#recipient_shift_idObject

Gets the recipientShiftId property value. ShiftId for the recipient user with whom the request is to swap.

Returns:

  • a string



42
43
44
# File 'lib/models/swap_shifts_change_request.rb', line 42

def recipient_shift_id
    return @recipient_shift_id
end

#recipient_shift_id=(value) ⇒ Object

Sets the recipientShiftId property value. ShiftId for the recipient user with whom the request is to swap.

Parameters:

  • value

    Value to set for the recipientShiftId property.

Returns:

  • a void



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

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


58
59
60
61
62
# File 'lib/models/swap_shifts_change_request.rb', line 58

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("recipientShiftId", @recipient_shift_id)
end