Class: MicrosoftGraph::Models::OpenShift

Inherits:
ChangeTrackedEntity show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/open_shift.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#initializeObject

Instantiates a new openShift and sets the default values.



22
23
24
25
# File 'lib/models/open_shift.rb', line 22

def initialize()
    super
    @odata_type = "#microsoft.graph.openShift"
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 open_shift

Raises:

  • (StandardError)


31
32
33
34
# File 'lib/models/open_shift.rb', line 31

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return OpenShift.new
end

Instance Method Details

#draft_open_shiftObject

Gets the draftOpenShift property value. An unpublished open shift.

Returns:

  • a open_shift_item



39
40
41
# File 'lib/models/open_shift.rb', line 39

def draft_open_shift
    return @draft_open_shift
end

#draft_open_shift=(value) ⇒ Object

Sets the draftOpenShift property value. An unpublished open shift.

Parameters:

  • value

    Value to set for the draftOpenShift property.

Returns:

  • a void



47
48
49
# File 'lib/models/open_shift.rb', line 47

def draft_open_shift=(value)
    @draft_open_shift = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



54
55
56
57
58
59
60
# File 'lib/models/open_shift.rb', line 54

def get_field_deserializers()
    return super.merge({
        "draftOpenShift" => lambda {|n| @draft_open_shift = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OpenShiftItem.create_from_discriminator_value(pn) }) },
        "schedulingGroupId" => lambda {|n| @scheduling_group_id = n.get_string_value() },
        "sharedOpenShift" => lambda {|n| @shared_open_shift = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OpenShiftItem.create_from_discriminator_value(pn) }) },
    })
end

#scheduling_group_idObject

Gets the schedulingGroupId property value. ID for the scheduling group that the open shift belongs to.

Returns:

  • a string



65
66
67
# File 'lib/models/open_shift.rb', line 65

def scheduling_group_id
    return @scheduling_group_id
end

#scheduling_group_id=(value) ⇒ Object

Sets the schedulingGroupId property value. ID for the scheduling group that the open shift belongs to.

Parameters:

  • value

    Value to set for the schedulingGroupId property.

Returns:

  • a void



73
74
75
# File 'lib/models/open_shift.rb', line 73

def scheduling_group_id=(value)
    @scheduling_group_id = 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)


81
82
83
84
85
86
87
# File 'lib/models/open_shift.rb', line 81

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("draftOpenShift", @draft_open_shift)
    writer.write_string_value("schedulingGroupId", @scheduling_group_id)
    writer.write_object_value("sharedOpenShift", @shared_open_shift)
end

#shared_open_shiftObject

Gets the sharedOpenShift property value. A published open shift.

Returns:

  • a open_shift_item



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

def shared_open_shift
    return @shared_open_shift
end

#shared_open_shift=(value) ⇒ Object

Sets the sharedOpenShift property value. A published open shift.

Parameters:

  • value

    Value to set for the sharedOpenShift property.

Returns:

  • a void



100
101
102
# File 'lib/models/open_shift.rb', line 100

def shared_open_shift=(value)
    @shared_open_shift = value
end