Class: MicrosoftGraph::Models::CustomTimeZone

Inherits:
TimeZoneBase
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/custom_time_zone.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TimeZoneBase

#additional_data, #additional_data=, #name, #name=, #odata_type, #odata_type=

Constructor Details

#initializeObject

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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a custom_time_zone

Raises:

  • (StandardError)


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

#biasObject

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.

Returns:

  • a integer



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.

Parameters:

  • value

    Value to set for the bias property.

Returns:

  • a void



30
31
32
# File 'lib/models/custom_time_zone.rb', line 30

def bias=(value)
    @bias = value
end

#daylight_offsetObject

Gets the daylightOffset property value. Specifies when the time zone switches from standard time to daylight saving time.

Returns:

  • a daylight_time_zone_offset



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.

Parameters:

  • value

    Value to set for the daylightOffset property.

Returns:

  • a void



62
63
64
# File 'lib/models/custom_time_zone.rb', line 62

def daylight_offset=(value)
    @daylight_offset = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


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_offsetObject

Gets the standardOffset property value. Specifies when the time zone switches from daylight saving time to standard time.

Returns:

  • a standard_time_zone_offset



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.

Parameters:

  • value

    Value to set for the standardOffset property.

Returns:

  • a void



100
101
102
# File 'lib/models/custom_time_zone.rb', line 100

def standard_offset=(value)
    @standard_offset = value
end