Class: MicrosoftGraph::Models::ShiftActivity

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new shiftActivity and sets the default values.



68
69
70
# File 'lib/models/shift_activity.rb', line 68

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 shift_activity

Raises:

  • (StandardError)


76
77
78
79
# File 'lib/models/shift_activity.rb', line 76

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ShiftActivity.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



38
39
40
# File 'lib/models/shift_activity.rb', line 38

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



46
47
48
# File 'lib/models/shift_activity.rb', line 46

def additional_data=(value)
    @additional_data = value
end

#codeObject

Gets the code property value. Customer defined code for the shiftActivity. Required.

Returns:

  • a string



53
54
55
# File 'lib/models/shift_activity.rb', line 53

def code
    return @code
end

#code=(value) ⇒ Object

Sets the code property value. Customer defined code for the shiftActivity. Required.

Parameters:

  • value

    Value to set for the code property.

Returns:

  • a void



61
62
63
# File 'lib/models/shift_activity.rb', line 61

def code=(value)
    @code = value
end

#display_nameObject

Gets the displayName property value. The name of the shiftActivity. Required.

Returns:

  • a string



84
85
86
# File 'lib/models/shift_activity.rb', line 84

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the shiftActivity. Required.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



92
93
94
# File 'lib/models/shift_activity.rb', line 92

def display_name=(value)
    @display_name = value
end

#end_date_timeObject

Gets the endDateTime property value. The end date and time for the shiftActivity. 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. Required.

Returns:

  • a date_time



99
100
101
# File 'lib/models/shift_activity.rb', line 99

def end_date_time
    return @end_date_time
end

#end_date_time=(value) ⇒ Object

Sets the endDateTime property value. The end date and time for the shiftActivity. 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. Required.

Parameters:

  • value

    Value to set for the endDateTime property.

Returns:

  • a void



107
108
109
# File 'lib/models/shift_activity.rb', line 107

def end_date_time=(value)
    @end_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



114
115
116
117
118
119
120
121
122
123
124
# File 'lib/models/shift_activity.rb', line 114

def get_field_deserializers()
    return {
        "code" => lambda {|n| @code = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "endDateTime" => lambda {|n| @end_date_time = n.get_date_time_value() },
        "isPaid" => lambda {|n| @is_paid = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "startDateTime" => lambda {|n| @start_date_time = n.get_date_time_value() },
        "theme" => lambda {|n| @theme = n.get_enum_value(MicrosoftGraph::Models::ScheduleEntityTheme) },
    }
end

#is_paidObject

Gets the isPaid property value. Indicates whether the microsoft.graph.user should be paid for the activity during their shift. Required.

Returns:

  • a boolean



129
130
131
# File 'lib/models/shift_activity.rb', line 129

def is_paid
    return @is_paid
end

#is_paid=(value) ⇒ Object

Sets the isPaid property value. Indicates whether the microsoft.graph.user should be paid for the activity during their shift. Required.

Parameters:

  • value

    Value to set for the isPaid property.

Returns:

  • a void



137
138
139
# File 'lib/models/shift_activity.rb', line 137

def is_paid=(value)
    @is_paid = value
end

#odata_typeObject

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

Returns:

  • a string



144
145
146
# File 'lib/models/shift_activity.rb', line 144

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



152
153
154
# File 'lib/models/shift_activity.rb', line 152

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)


160
161
162
163
164
165
166
167
168
169
170
# File 'lib/models/shift_activity.rb', line 160

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("code", @code)
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("endDateTime", @end_date_time)
    writer.write_boolean_value("isPaid", @is_paid)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_date_time_value("startDateTime", @start_date_time)
    writer.write_enum_value("theme", @theme)
    writer.write_additional_data(@additional_data)
end

#start_date_timeObject

Gets the startDateTime property value. The start date and time for the shiftActivity. 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. Required.

Returns:

  • a date_time



175
176
177
# File 'lib/models/shift_activity.rb', line 175

def start_date_time
    return @start_date_time
end

#start_date_time=(value) ⇒ Object

Sets the startDateTime property value. The start date and time for the shiftActivity. 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. Required.

Parameters:

  • value

    Value to set for the startDateTime property.

Returns:

  • a void



183
184
185
# File 'lib/models/shift_activity.rb', line 183

def start_date_time=(value)
    @start_date_time = value
end

#themeObject

Gets the theme property value. The theme property

Returns:

  • a schedule_entity_theme



190
191
192
# File 'lib/models/shift_activity.rb', line 190

def theme
    return @theme
end

#theme=(value) ⇒ Object

Sets the theme property value. The theme property

Parameters:

  • value

    Value to set for the theme property.

Returns:

  • a void



198
199
200
# File 'lib/models/shift_activity.rb', line 198

def theme=(value)
    @theme = value
end