Class: MicrosoftGraph::Models::StandardTimeZoneOffset

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

Direct Known Subclasses

DaylightTimeZoneOffset

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new standardTimeZoneOffset and sets the default values.



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

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 standard_time_zone_offset

Raises:

  • (StandardError)


58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/models/standard_time_zone_offset.rb', line 58

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.daylightTimeZoneOffset"
                return DaylightTimeZoneOffset.new
        end
    end
    return StandardTimeZoneOffset.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



35
36
37
# File 'lib/models/standard_time_zone_offset.rb', line 35

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



43
44
45
# File 'lib/models/standard_time_zone_offset.rb', line 43

def additional_data=(value)
    @additional_data = value
end

#day_occurrenceObject

Gets the dayOccurrence property value. Represents the nth occurrence of the day of week that the transition from daylight saving time to standard time occurs.

Returns:

  • a integer



74
75
76
# File 'lib/models/standard_time_zone_offset.rb', line 74

def day_occurrence
    return @day_occurrence
end

#day_occurrence=(value) ⇒ Object

Sets the dayOccurrence property value. Represents the nth occurrence of the day of week that the transition from daylight saving time to standard time occurs.

Parameters:

  • value

    Value to set for the dayOccurrence property.

Returns:

  • a void



82
83
84
# File 'lib/models/standard_time_zone_offset.rb', line 82

def day_occurrence=(value)
    @day_occurrence = value
end

#day_of_weekObject

Gets the dayOfWeek property value. Represents the day of the week when the transition from daylight saving time to standard time.

Returns:

  • a day_of_week



89
90
91
# File 'lib/models/standard_time_zone_offset.rb', line 89

def day_of_week
    return @day_of_week
end

#day_of_week=(value) ⇒ Object

Sets the dayOfWeek property value. Represents the day of the week when the transition from daylight saving time to standard time.

Parameters:

  • value

    Value to set for the dayOfWeek property.

Returns:

  • a void



97
98
99
# File 'lib/models/standard_time_zone_offset.rb', line 97

def day_of_week=(value)
    @day_of_week = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



104
105
106
107
108
109
110
111
112
113
# File 'lib/models/standard_time_zone_offset.rb', line 104

def get_field_deserializers()
    return {
        "dayOccurrence" => lambda {|n| @day_occurrence = n.get_number_value() },
        "dayOfWeek" => lambda {|n| @day_of_week = n.get_enum_value(MicrosoftGraph::Models::DayOfWeek) },
        "month" => lambda {|n| @month = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "time" => lambda {|n| @time = n.get_time_value() },
        "year" => lambda {|n| @year = n.get_number_value() },
    }
end

#monthObject

Gets the month property value. Represents the month of the year when the transition from daylight saving time to standard time occurs.

Returns:

  • a integer



118
119
120
# File 'lib/models/standard_time_zone_offset.rb', line 118

def month
    return @month
end

#month=(value) ⇒ Object

Sets the month property value. Represents the month of the year when the transition from daylight saving time to standard time occurs.

Parameters:

  • value

    Value to set for the month property.

Returns:

  • a void



126
127
128
# File 'lib/models/standard_time_zone_offset.rb', line 126

def month=(value)
    @month = value
end

#odata_typeObject

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

Returns:

  • a string



133
134
135
# File 'lib/models/standard_time_zone_offset.rb', line 133

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



141
142
143
# File 'lib/models/standard_time_zone_offset.rb', line 141

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)


149
150
151
152
153
154
155
156
157
158
# File 'lib/models/standard_time_zone_offset.rb', line 149

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("dayOccurrence", @day_occurrence)
    writer.write_enum_value("dayOfWeek", @day_of_week)
    writer.write_number_value("month", @month)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_time_value("time", @time)
    writer.write_number_value("year", @year)
    writer.write_additional_data(@additional_data)
end

#timeObject

Gets the time property value. Represents the time of day when the transition from daylight saving time to standard time occurs.

Returns:

  • a time



163
164
165
# File 'lib/models/standard_time_zone_offset.rb', line 163

def time
    return @time
end

#time=(value) ⇒ Object

Sets the time property value. Represents the time of day when the transition from daylight saving time to standard time occurs.

Parameters:

  • value

    Value to set for the time property.

Returns:

  • a void



171
172
173
# File 'lib/models/standard_time_zone_offset.rb', line 171

def time=(value)
    @time = value
end

#yearObject

Gets the year property value. Represents how frequently in terms of years the change from daylight saving time to standard time occurs. For example, a value of 0 means every year.

Returns:

  • a integer



178
179
180
# File 'lib/models/standard_time_zone_offset.rb', line 178

def year
    return @year
end

#year=(value) ⇒ Object

Sets the year property value. Represents how frequently in terms of years the change from daylight saving time to standard time occurs. For example, a value of 0 means every year.

Parameters:

  • value

    Value to set for the year property.

Returns:

  • a void



186
187
188
# File 'lib/models/standard_time_zone_offset.rb', line 186

def year=(value)
    @year = value
end