Class: MicrosoftGraph::Models::Shift
- Inherits:
-
ChangeTrackedEntity
- Object
- Entity
- ChangeTrackedEntity
- MicrosoftGraph::Models::Shift
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/shift.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
-
#draft_shift ⇒ Object
Gets the draftShift property value.
-
#draft_shift=(value) ⇒ Object
Sets the draftShift property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new shift and sets the default values.
-
#scheduling_group_id ⇒ Object
Gets the schedulingGroupId property value.
-
#scheduling_group_id=(value) ⇒ Object
Sets the schedulingGroupId property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#shared_shift ⇒ Object
Gets the sharedShift property value.
-
#shared_shift=(value) ⇒ Object
Sets the sharedShift property value.
-
#user_id ⇒ Object
Gets the userId property value.
-
#user_id=(value) ⇒ Object
Sets the userId property value.
Methods inherited from ChangeTrackedEntity
#created_date_time, #created_date_time=, #last_modified_by, #last_modified_by=, #last_modified_date_time, #last_modified_date_time=
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new shift and sets the default values.
25 26 27 28 |
# File 'lib/models/shift.rb', line 25 def initialize() super @odata_type = "#microsoft.graph.shift" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
34 35 36 37 |
# File 'lib/models/shift.rb', line 34 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return Shift.new end |
Instance Method Details
#draft_shift ⇒ Object
Gets the draftShift property value. The draft version of this shift that is viewable by managers. Required.
42 43 44 |
# File 'lib/models/shift.rb', line 42 def draft_shift return @draft_shift end |
#draft_shift=(value) ⇒ Object
Sets the draftShift property value. The draft version of this shift that is viewable by managers. Required.
50 51 52 |
# File 'lib/models/shift.rb', line 50 def draft_shift=(value) @draft_shift = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
57 58 59 60 61 62 63 64 |
# File 'lib/models/shift.rb', line 57 def get_field_deserializers() return super.merge({ "draftShift" => lambda {|n| @draft_shift = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ShiftItem.create_from_discriminator_value(pn) }) }, "schedulingGroupId" => lambda {|n| @scheduling_group_id = n.get_string_value() }, "sharedShift" => lambda {|n| @shared_shift = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ShiftItem.create_from_discriminator_value(pn) }) }, "userId" => lambda {|n| @user_id = n.get_string_value() }, }) end |
#scheduling_group_id ⇒ Object
Gets the schedulingGroupId property value. ID of the scheduling group the shift is part of. Required.
69 70 71 |
# File 'lib/models/shift.rb', line 69 def scheduling_group_id return @scheduling_group_id end |
#scheduling_group_id=(value) ⇒ Object
Sets the schedulingGroupId property value. ID of the scheduling group the shift is part of. Required.
77 78 79 |
# File 'lib/models/shift.rb', line 77 def scheduling_group_id=(value) @scheduling_group_id = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
85 86 87 88 89 90 91 92 |
# File 'lib/models/shift.rb', line 85 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("draftShift", @draft_shift) writer.write_string_value("schedulingGroupId", @scheduling_group_id) writer.write_object_value("sharedShift", @shared_shift) writer.write_string_value("userId", @user_id) end |
#shared_shift ⇒ Object
Gets the sharedShift property value. The shared version of this shift that is viewable by both employees and managers. Required.
97 98 99 |
# File 'lib/models/shift.rb', line 97 def shared_shift return @shared_shift end |
#shared_shift=(value) ⇒ Object
Sets the sharedShift property value. The shared version of this shift that is viewable by both employees and managers. Required.
105 106 107 |
# File 'lib/models/shift.rb', line 105 def shared_shift=(value) @shared_shift = value end |
#user_id ⇒ Object
Gets the userId property value. ID of the user assigned to the shift. Required.
112 113 114 |
# File 'lib/models/shift.rb', line 112 def user_id return @user_id end |
#user_id=(value) ⇒ Object
Sets the userId property value. ID of the user assigned to the shift. Required.
120 121 122 |
# File 'lib/models/shift.rb', line 120 def user_id=(value) @user_id = value end |