Class: MicrosoftGraph::Models::TimeOffReason
- Inherits:
-
ChangeTrackedEntity
- Object
- Entity
- ChangeTrackedEntity
- MicrosoftGraph::Models::TimeOffReason
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/time_off_reason.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
-
#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.
-
#icon_type ⇒ Object
Gets the iconType property value.
-
#icon_type=(value) ⇒ Object
Sets the iconType property value.
-
#initialize ⇒ Object
constructor
Instantiates a new timeOffReason and sets the default values.
-
#is_active ⇒ Object
Gets the isActive property value.
-
#is_active=(value) ⇒ Object
Sets the isActive property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
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 timeOffReason and sets the default values.
22 23 24 25 |
# File 'lib/models/time_off_reason.rb', line 22 def initialize() super @odata_type = "#microsoft.graph.timeOffReason" 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_reason.rb', line 31 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return TimeOffReason.new end |
Instance Method Details
#display_name ⇒ Object
Gets the displayName property value. The name of the timeOffReason. Required.
39 40 41 |
# File 'lib/models/time_off_reason.rb', line 39 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. The name of the timeOffReason. Required.
47 48 49 |
# File 'lib/models/time_off_reason.rb', line 47 def display_name=(value) @display_name = 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_reason.rb', line 54 def get_field_deserializers() return super.merge({ "displayName" => lambda {|n| @display_name = n.get_string_value() }, "iconType" => lambda {|n| @icon_type = n.get_enum_value(MicrosoftGraph::Models::TimeOffReasonIconType) }, "isActive" => lambda {|n| @is_active = n.get_boolean_value() }, }) end |
#icon_type ⇒ Object
Gets the iconType property value. Supported icon types are: none, car, calendar, running, plane, firstAid, doctor, notWorking, clock, juryDuty, globe, cup, phone, weather, umbrella, piggyBank, dog, cake, trafficCone, pin, sunny. Required.
65 66 67 |
# File 'lib/models/time_off_reason.rb', line 65 def icon_type return @icon_type end |
#icon_type=(value) ⇒ Object
Sets the iconType property value. Supported icon types are: none, car, calendar, running, plane, firstAid, doctor, notWorking, clock, juryDuty, globe, cup, phone, weather, umbrella, piggyBank, dog, cake, trafficCone, pin, sunny. Required.
73 74 75 |
# File 'lib/models/time_off_reason.rb', line 73 def icon_type=(value) @icon_type = value end |
#is_active ⇒ Object
Gets the isActive property value. Indicates whether the timeOffReason can be used when creating new entities or updating existing ones. Required.
80 81 82 |
# File 'lib/models/time_off_reason.rb', line 80 def is_active return @is_active end |
#is_active=(value) ⇒ Object
Sets the isActive property value. Indicates whether the timeOffReason can be used when creating new entities or updating existing ones. Required.
88 89 90 |
# File 'lib/models/time_off_reason.rb', line 88 def is_active=(value) @is_active = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
96 97 98 99 100 101 102 |
# File 'lib/models/time_off_reason.rb', line 96 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_string_value("displayName", @display_name) writer.write_enum_value("iconType", @icon_type) writer.write_boolean_value("isActive", @is_active) end |