Class: MicrosoftGraph::Models::ShiftItem
- Inherits:
-
ScheduleEntity
- Object
- ScheduleEntity
- MicrosoftGraph::Models::ShiftItem
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/shift_item.rb
Direct Known Subclasses
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
-
#activities ⇒ Object
Gets the activities property value.
-
#activities=(value) ⇒ Object
Sets the activities property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new shiftItem and sets the default values.
-
#notes ⇒ Object
Gets the notes property value.
-
#notes=(value) ⇒ Object
Sets the notes property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from ScheduleEntity
#additional_data, #additional_data=, #end_date_time, #end_date_time=, #odata_type, #odata_type=, #start_date_time, #start_date_time=, #theme, #theme=
Constructor Details
#initialize ⇒ Object
Instantiates a new shiftItem and sets the default values.
37 38 39 |
# File 'lib/models/shift_item.rb', line 37 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/models/shift_item.rb', line 45 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.openShiftItem" return OpenShiftItem.new end end return ShiftItem.new end |
Instance Method Details
#activities ⇒ Object
Gets the activities property value. An incremental part of a shift which can cover details of when and where an employee is during their shift. For example, an assignment or a scheduled break or lunch. Required.
22 23 24 |
# File 'lib/models/shift_item.rb', line 22 def activities return @activities end |
#activities=(value) ⇒ Object
Sets the activities property value. An incremental part of a shift which can cover details of when and where an employee is during their shift. For example, an assignment or a scheduled break or lunch. Required.
30 31 32 |
# File 'lib/models/shift_item.rb', line 30 def activities=(value) @activities = value end |
#display_name ⇒ Object
Gets the displayName property value. The shift label of the shiftItem.
61 62 63 |
# File 'lib/models/shift_item.rb', line 61 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. The shift label of the shiftItem.
69 70 71 |
# File 'lib/models/shift_item.rb', line 69 def display_name=(value) @display_name = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
76 77 78 79 80 81 82 |
# File 'lib/models/shift_item.rb', line 76 def get_field_deserializers() return super.merge({ "activities" => lambda {|n| @activities = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ShiftActivity.create_from_discriminator_value(pn) }) }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "notes" => lambda {|n| @notes = n.get_string_value() }, }) end |
#notes ⇒ Object
Gets the notes property value. The shift notes for the shiftItem.
87 88 89 |
# File 'lib/models/shift_item.rb', line 87 def notes return @notes end |
#notes=(value) ⇒ Object
Sets the notes property value. The shift notes for the shiftItem.
95 96 97 |
# File 'lib/models/shift_item.rb', line 95 def notes=(value) @notes = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
103 104 105 106 107 108 109 |
# File 'lib/models/shift_item.rb', line 103 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_collection_of_object_values("activities", @activities) writer.write_string_value("displayName", @display_name) writer.write_string_value("notes", @notes) end |