Class: MicrosoftGraph::Models::TimeOff
- Inherits:
-
ChangeTrackedEntity
- Object
- Entity
- ChangeTrackedEntity
- MicrosoftGraph::Models::TimeOff
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/time_off.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_time_off ⇒ Object
Gets the draftTimeOff property value.
-
#draft_time_off=(value) ⇒ Object
Sets the draftTimeOff property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new timeOff and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#shared_time_off ⇒ Object
Gets the sharedTimeOff property value.
-
#shared_time_off=(value) ⇒ Object
Sets the sharedTimeOff 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 timeOff and sets the default values.
22 23 24 25 |
# File 'lib/models/time_off.rb', line 22 def initialize() super @odata_type = "#microsoft.graph.timeOff" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
31 32 33 34 |
# File 'lib/models/time_off.rb', line 31 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return TimeOff.new end |
Instance Method Details
#draft_time_off ⇒ Object
Gets the draftTimeOff property value. The draft version of this timeOff that is viewable by managers. Required.
39 40 41 |
# File 'lib/models/time_off.rb', line 39 def draft_time_off return @draft_time_off end |
#draft_time_off=(value) ⇒ Object
Sets the draftTimeOff property value. The draft version of this timeOff that is viewable by managers. Required.
47 48 49 |
# File 'lib/models/time_off.rb', line 47 def draft_time_off=(value) @draft_time_off = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
54 55 56 57 58 59 60 |
# File 'lib/models/time_off.rb', line 54 def get_field_deserializers() return super.merge({ "draftTimeOff" => lambda {|n| @draft_time_off = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TimeOffItem.create_from_discriminator_value(pn) }) }, "sharedTimeOff" => lambda {|n| @shared_time_off = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TimeOffItem.create_from_discriminator_value(pn) }) }, "userId" => lambda {|n| @user_id = n.get_string_value() }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
66 67 68 69 70 71 72 |
# File 'lib/models/time_off.rb', line 66 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("draftTimeOff", @draft_time_off) writer.write_object_value("sharedTimeOff", @shared_time_off) writer.write_string_value("userId", @user_id) end |
#shared_time_off ⇒ Object
Gets the sharedTimeOff property value. The shared version of this timeOff that is viewable by both employees and managers. Required.
77 78 79 |
# File 'lib/models/time_off.rb', line 77 def shared_time_off return @shared_time_off end |
#shared_time_off=(value) ⇒ Object
Sets the sharedTimeOff property value. The shared version of this timeOff that is viewable by both employees and managers. Required.
85 86 87 |
# File 'lib/models/time_off.rb', line 85 def shared_time_off=(value) @shared_time_off = value end |
#user_id ⇒ Object
Gets the userId property value. ID of the user assigned to the timeOff. Required.
92 93 94 |
# File 'lib/models/time_off.rb', line 92 def user_id return @user_id end |
#user_id=(value) ⇒ Object
Sets the userId property value. ID of the user assigned to the timeOff. Required.
100 101 102 |
# File 'lib/models/time_off.rb', line 100 def user_id=(value) @user_id = value end |