Class: MicrosoftGraph::Models::CustomTimeZone
- Inherits:
-
TimeZoneBase
- Object
- TimeZoneBase
- MicrosoftGraph::Models::CustomTimeZone
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/custom_time_zone.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#bias ⇒ Object
Gets the bias property value.
-
#bias=(value) ⇒ Object
Sets the bias property value.
-
#daylight_offset ⇒ Object
Gets the daylightOffset property value.
-
#daylight_offset=(value) ⇒ Object
Sets the daylightOffset property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new customTimeZone and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#standard_offset ⇒ Object
Gets the standardOffset property value.
-
#standard_offset=(value) ⇒ Object
Sets the standardOffset property value.
Methods inherited from TimeZoneBase
#additional_data, #additional_data=, #name, #name=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new customTimeZone and sets the default values.
37 38 39 40 |
# File 'lib/models/custom_time_zone.rb', line 37 def initialize() super @odata_type = "#microsoft.graph.customTimeZone" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
46 47 48 49 |
# File 'lib/models/custom_time_zone.rb', line 46 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return CustomTimeZone.new end |
Instance Method Details
#bias ⇒ Object
Gets the bias property value. The time offset of the time zone from Coordinated Universal Time (UTC). This value is in minutes. Time zones that are ahead of UTC have a positive offset; time zones that are behind UTC have a negative offset.
22 23 24 |
# File 'lib/models/custom_time_zone.rb', line 22 def bias return @bias end |
#bias=(value) ⇒ Object
Sets the bias property value. The time offset of the time zone from Coordinated Universal Time (UTC). This value is in minutes. Time zones that are ahead of UTC have a positive offset; time zones that are behind UTC have a negative offset.
30 31 32 |
# File 'lib/models/custom_time_zone.rb', line 30 def bias=(value) @bias = value end |
#daylight_offset ⇒ Object
Gets the daylightOffset property value. Specifies when the time zone switches from standard time to daylight saving time.
54 55 56 |
# File 'lib/models/custom_time_zone.rb', line 54 def daylight_offset return @daylight_offset end |
#daylight_offset=(value) ⇒ Object
Sets the daylightOffset property value. Specifies when the time zone switches from standard time to daylight saving time.
62 63 64 |
# File 'lib/models/custom_time_zone.rb', line 62 def daylight_offset=(value) @daylight_offset = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
69 70 71 72 73 74 75 |
# File 'lib/models/custom_time_zone.rb', line 69 def get_field_deserializers() return super.merge({ "bias" => lambda {|n| @bias = n.get_number_value() }, "daylightOffset" => lambda {|n| @daylight_offset = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DaylightTimeZoneOffset.create_from_discriminator_value(pn) }) }, "standardOffset" => lambda {|n| @standard_offset = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::StandardTimeZoneOffset.create_from_discriminator_value(pn) }) }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
81 82 83 84 85 86 87 |
# File 'lib/models/custom_time_zone.rb', line 81 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_number_value("bias", @bias) writer.write_object_value("daylightOffset", @daylight_offset) writer.write_object_value("standardOffset", @standard_offset) end |
#standard_offset ⇒ Object
Gets the standardOffset property value. Specifies when the time zone switches from daylight saving time to standard time.
92 93 94 |
# File 'lib/models/custom_time_zone.rb', line 92 def standard_offset return @standard_offset end |
#standard_offset=(value) ⇒ Object
Sets the standardOffset property value. Specifies when the time zone switches from daylight saving time to standard time.
100 101 102 |
# File 'lib/models/custom_time_zone.rb', line 100 def standard_offset=(value) @standard_offset = value end |