Class: MicrosoftGraph::Models::TimeOffRequest

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

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

#initialize ⇒ Object

Instantiates a new timeOffRequest and sets the default values.



23
24
25
26
# File 'lib/models/time_off_request.rb', line 23

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

Raises:

  • (StandardError)


32
33
34
35
# File 'lib/models/time_off_request.rb', line 32

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

Instance Method Details

#end_date_time ⇒ Object

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



40
41
42
# File 'lib/models/time_off_request.rb', line 40

def end_date_time
    return @end_date_time
end

#end_date_time=(value) ⇒ Object

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

Returns:

  • a void



48
49
50
# File 'lib/models/time_off_request.rb', line 48

def end_date_time=(value)
    @end_date_time = value
end

#get_field_deserializers ⇒ Object

The deserialization information for the current model

Returns:

  • a i_dictionary



55
56
57
58
59
60
61
# File 'lib/models/time_off_request.rb', line 55

def get_field_deserializers()
    return super.merge({
        "endDateTime" => lambda {|n| @end_date_time = n.get_date_time_value() },
        "startDateTime" => lambda {|n| @start_date_time = n.get_date_time_value() },
        "timeOffReasonId" => lambda {|n| @time_off_reason_id = n.get_string_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)


67
68
69
70
71
72
73
# File 'lib/models/time_off_request.rb', line 67

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("endDateTime", @end_date_time)
    writer.write_date_time_value("startDateTime", @start_date_time)
    writer.write_string_value("timeOffReasonId", @time_off_reason_id)
end

#start_date_time ⇒ Object

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



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

def start_date_time
    return @start_date_time
end

#start_date_time=(value) ⇒ Object

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

Returns:

  • a void



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

def start_date_time=(value)
    @start_date_time = value
end

#time_off_reason_id ⇒ Object

Gets the timeOffReasonId property value. The reason for the time off.

Returns:

  • a string



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

def time_off_reason_id
    return @time_off_reason_id
end

#time_off_reason_id=(value) ⇒ Object

Sets the timeOffReasonId property value. The reason for the time off.

Parameters:

  • value —

    Value to set for the timeOffReasonId property.

Returns:

  • a void



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

def time_off_reason_id=(value)
    @time_off_reason_id = value
end