Class: MicrosoftGraph::Models::WorkingHours

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/working_hours.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new workingHours and sets the default values.



47
48
49
# File 'lib/models/working_hours.rb', line 47

def initialize()
    @additional_data = Hash.new
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 working_hours

Raises:

  • (StandardError)


55
56
57
58
# File 'lib/models/working_hours.rb', line 55

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



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

def additional_data=(value)
    @additional_data = value
end

#days_of_weekObject

Gets the daysOfWeek property value. The days of the week on which the user works.

Returns:

  • a day_of_week



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

def days_of_week
    return @days_of_week
end

#days_of_week=(value) ⇒ Object

Sets the daysOfWeek property value. The days of the week on which the user works.

Parameters:

  • value

    Value to set for the daysOfWeek property.

Returns:

  • a void



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

def days_of_week=(value)
    @days_of_week = value
end

#end_timeObject

Gets the endTime property value. The time of the day that the user stops working.

Returns:

  • a time



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

def end_time
    return @end_time
end

#end_time=(value) ⇒ Object

Sets the endTime property value. The time of the day that the user stops working.

Parameters:

  • value

    Value to set for the endTime property.

Returns:

  • a void



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

def end_time=(value)
    @end_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



93
94
95
96
97
98
99
100
101
# File 'lib/models/working_hours.rb', line 93

def get_field_deserializers()
    return {
        "daysOfWeek" => lambda {|n| @days_of_week = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DayOfWeek.create_from_discriminator_value(pn) }) },
        "endTime" => lambda {|n| @end_time = n.get_time_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "startTime" => lambda {|n| @start_time = n.get_time_value() },
        "timeZone" => lambda {|n| @time_zone = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TimeZoneBase.create_from_discriminator_value(pn) }) },
    }
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



106
107
108
# File 'lib/models/working_hours.rb', line 106

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



114
115
116
# File 'lib/models/working_hours.rb', line 114

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


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_collection_of_object_values("daysOfWeek", @days_of_week)
    writer.write_time_value("endTime", @end_time)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_time_value("startTime", @start_time)
    writer.write_object_value("timeZone", @time_zone)
    writer.write_additional_data(@additional_data)
end

#start_timeObject

Gets the startTime property value. The time of the day that the user starts working.

Returns:

  • a time



135
136
137
# File 'lib/models/working_hours.rb', line 135

def start_time
    return @start_time
end

#start_time=(value) ⇒ Object

Sets the startTime property value. The time of the day that the user starts working.

Parameters:

  • value

    Value to set for the startTime property.

Returns:

  • a void



143
144
145
# File 'lib/models/working_hours.rb', line 143

def start_time=(value)
    @start_time = value
end

#time_zoneObject

Gets the timeZone property value. The time zone to which the working hours apply.

Returns:

  • a time_zone_base



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

def time_zone
    return @time_zone
end

#time_zone=(value) ⇒ Object

Sets the timeZone property value. The time zone to which the working hours apply.

Parameters:

  • value

    Value to set for the timeZone property.

Returns:

  • a void



158
159
160
# File 'lib/models/working_hours.rb', line 158

def time_zone=(value)
    @time_zone = value
end