Class: MicrosoftGraph::Models::Schedule

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/schedule.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new schedule and sets the default values.



70
71
72
# File 'lib/models/schedule.rb', line 70

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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a schedule

Raises:

  • (StandardError)


78
79
80
81
# File 'lib/models/schedule.rb', line 78

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

Instance Method Details

#enabledObject

Gets the enabled property value. Indicates whether the schedule is enabled for the team. Required.

Returns:

  • a boolean



86
87
88
# File 'lib/models/schedule.rb', line 86

def enabled
    return @enabled
end

#enabled=(value) ⇒ Object

Sets the enabled property value. Indicates whether the schedule is enabled for the team. Required.

Parameters:

  • value

    Value to set for the enabled property.

Returns:

  • a void



94
95
96
# File 'lib/models/schedule.rb', line 94

def enabled=(value)
    @enabled = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/models/schedule.rb', line 101

def get_field_deserializers()
    return super.merge({
        "enabled" => lambda {|n| @enabled = n.get_boolean_value() },
        "offerShiftRequests" => lambda {|n| @offer_shift_requests = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OfferShiftRequest.create_from_discriminator_value(pn) }) },
        "offerShiftRequestsEnabled" => lambda {|n| @offer_shift_requests_enabled = n.get_boolean_value() },
        "openShiftChangeRequests" => lambda {|n| @open_shift_change_requests = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OpenShiftChangeRequest.create_from_discriminator_value(pn) }) },
        "openShifts" => lambda {|n| @open_shifts = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OpenShift.create_from_discriminator_value(pn) }) },
        "openShiftsEnabled" => lambda {|n| @open_shifts_enabled = n.get_boolean_value() },
        "provisionStatus" => lambda {|n| @provision_status = n.get_enum_value(MicrosoftGraph::Models::OperationStatus) },
        "provisionStatusCode" => lambda {|n| @provision_status_code = n.get_string_value() },
        "schedulingGroups" => lambda {|n| @scheduling_groups = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SchedulingGroup.create_from_discriminator_value(pn) }) },
        "shifts" => lambda {|n| @shifts = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Shift.create_from_discriminator_value(pn) }) },
        "swapShiftsChangeRequests" => lambda {|n| @swap_shifts_change_requests = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SwapShiftsChangeRequest.create_from_discriminator_value(pn) }) },
        "swapShiftsRequestsEnabled" => lambda {|n| @swap_shifts_requests_enabled = n.get_boolean_value() },
        "timeClockEnabled" => lambda {|n| @time_clock_enabled = n.get_boolean_value() },
        "timeOffReasons" => lambda {|n| @time_off_reasons = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TimeOffReason.create_from_discriminator_value(pn) }) },
        "timeOffRequests" => lambda {|n| @time_off_requests = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TimeOffRequest.create_from_discriminator_value(pn) }) },
        "timeOffRequestsEnabled" => lambda {|n| @time_off_requests_enabled = n.get_boolean_value() },
        "timeZone" => lambda {|n| @time_zone = n.get_string_value() },
        "timesOff" => lambda {|n| @times_off = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TimeOff.create_from_discriminator_value(pn) }) },
        "workforceIntegrationIds" => lambda {|n| @workforce_integration_ids = n.get_collection_of_primitive_values(String) },
    })
end

#offer_shift_requestsObject

Gets the offerShiftRequests property value. The offer requests for shifts in the schedule.

Returns:

  • a offer_shift_request



128
129
130
# File 'lib/models/schedule.rb', line 128

def offer_shift_requests
    return @offer_shift_requests
end

#offer_shift_requests=(value) ⇒ Object

Sets the offerShiftRequests property value. The offer requests for shifts in the schedule.

Parameters:

  • value

    Value to set for the offerShiftRequests property.

Returns:

  • a void



136
137
138
# File 'lib/models/schedule.rb', line 136

def offer_shift_requests=(value)
    @offer_shift_requests = value
end

#offer_shift_requests_enabledObject

Gets the offerShiftRequestsEnabled property value. Indicates whether offer shift requests are enabled for the schedule.

Returns:

  • a boolean



143
144
145
# File 'lib/models/schedule.rb', line 143

def offer_shift_requests_enabled
    return @offer_shift_requests_enabled
end

#offer_shift_requests_enabled=(value) ⇒ Object

Sets the offerShiftRequestsEnabled property value. Indicates whether offer shift requests are enabled for the schedule.

Parameters:

  • value

    Value to set for the offerShiftRequestsEnabled property.

Returns:

  • a void



151
152
153
# File 'lib/models/schedule.rb', line 151

def offer_shift_requests_enabled=(value)
    @offer_shift_requests_enabled = value
end

#open_shift_change_requestsObject

Gets the openShiftChangeRequests property value. The open shift requests in the schedule.

Returns:

  • a open_shift_change_request



158
159
160
# File 'lib/models/schedule.rb', line 158

def open_shift_change_requests
    return @open_shift_change_requests
end

#open_shift_change_requests=(value) ⇒ Object

Sets the openShiftChangeRequests property value. The open shift requests in the schedule.

Parameters:

  • value

    Value to set for the openShiftChangeRequests property.

Returns:

  • a void



166
167
168
# File 'lib/models/schedule.rb', line 166

def open_shift_change_requests=(value)
    @open_shift_change_requests = value
end

#open_shiftsObject

Gets the openShifts property value. The set of open shifts in a scheduling group in the schedule.

Returns:

  • a open_shift



173
174
175
# File 'lib/models/schedule.rb', line 173

def open_shifts
    return @open_shifts
end

#open_shifts=(value) ⇒ Object

Sets the openShifts property value. The set of open shifts in a scheduling group in the schedule.

Parameters:

  • value

    Value to set for the openShifts property.

Returns:

  • a void



181
182
183
# File 'lib/models/schedule.rb', line 181

def open_shifts=(value)
    @open_shifts = value
end

#open_shifts_enabledObject

Gets the openShiftsEnabled property value. Indicates whether open shifts are enabled for the schedule.

Returns:

  • a boolean



188
189
190
# File 'lib/models/schedule.rb', line 188

def open_shifts_enabled
    return @open_shifts_enabled
end

#open_shifts_enabled=(value) ⇒ Object

Sets the openShiftsEnabled property value. Indicates whether open shifts are enabled for the schedule.

Parameters:

  • value

    Value to set for the openShiftsEnabled property.

Returns:

  • a void



196
197
198
# File 'lib/models/schedule.rb', line 196

def open_shifts_enabled=(value)
    @open_shifts_enabled = value
end

#provision_statusObject

Gets the provisionStatus property value. The status of the schedule provisioning. The possible values are notStarted, running, completed, failed.

Returns:

  • a operation_status



203
204
205
# File 'lib/models/schedule.rb', line 203

def provision_status
    return @provision_status
end

#provision_status=(value) ⇒ Object

Sets the provisionStatus property value. The status of the schedule provisioning. The possible values are notStarted, running, completed, failed.

Parameters:

  • value

    Value to set for the provisionStatus property.

Returns:

  • a void



211
212
213
# File 'lib/models/schedule.rb', line 211

def provision_status=(value)
    @provision_status = value
end

#provision_status_codeObject

Gets the provisionStatusCode property value. Additional information about why schedule provisioning failed.

Returns:

  • a string



218
219
220
# File 'lib/models/schedule.rb', line 218

def provision_status_code
    return @provision_status_code
end

#provision_status_code=(value) ⇒ Object

Sets the provisionStatusCode property value. Additional information about why schedule provisioning failed.

Parameters:

  • value

    Value to set for the provisionStatusCode property.

Returns:

  • a void



226
227
228
# File 'lib/models/schedule.rb', line 226

def provision_status_code=(value)
    @provision_status_code = value
end

#scheduling_groupsObject

Gets the schedulingGroups property value. The logical grouping of users in the schedule (usually by role).

Returns:

  • a scheduling_group



233
234
235
# File 'lib/models/schedule.rb', line 233

def scheduling_groups
    return @scheduling_groups
end

#scheduling_groups=(value) ⇒ Object

Sets the schedulingGroups property value. The logical grouping of users in the schedule (usually by role).

Parameters:

  • value

    Value to set for the schedulingGroups property.

Returns:

  • a void



241
242
243
# File 'lib/models/schedule.rb', line 241

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


249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/models/schedule.rb', line 249

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("enabled", @enabled)
    writer.write_collection_of_object_values("offerShiftRequests", @offer_shift_requests)
    writer.write_boolean_value("offerShiftRequestsEnabled", @offer_shift_requests_enabled)
    writer.write_collection_of_object_values("openShiftChangeRequests", @open_shift_change_requests)
    writer.write_collection_of_object_values("openShifts", @open_shifts)
    writer.write_boolean_value("openShiftsEnabled", @open_shifts_enabled)
    writer.write_collection_of_object_values("schedulingGroups", @scheduling_groups)
    writer.write_collection_of_object_values("shifts", @shifts)
    writer.write_collection_of_object_values("swapShiftsChangeRequests", @swap_shifts_change_requests)
    writer.write_boolean_value("swapShiftsRequestsEnabled", @swap_shifts_requests_enabled)
    writer.write_boolean_value("timeClockEnabled", @time_clock_enabled)
    writer.write_collection_of_object_values("timeOffReasons", @time_off_reasons)
    writer.write_collection_of_object_values("timeOffRequests", @time_off_requests)
    writer.write_boolean_value("timeOffRequestsEnabled", @time_off_requests_enabled)
    writer.write_string_value("timeZone", @time_zone)
    writer.write_collection_of_object_values("timesOff", @times_off)
    writer.write_collection_of_primitive_values("workforceIntegrationIds", @workforce_integration_ids)
end

#shiftsObject

Gets the shifts property value. The shifts in the schedule.

Returns:

  • a shift



274
275
276
# File 'lib/models/schedule.rb', line 274

def shifts
    return @shifts
end

#shifts=(value) ⇒ Object

Sets the shifts property value. The shifts in the schedule.

Parameters:

  • value

    Value to set for the shifts property.

Returns:

  • a void



282
283
284
# File 'lib/models/schedule.rb', line 282

def shifts=(value)
    @shifts = value
end

#swap_shifts_change_requestsObject

Gets the swapShiftsChangeRequests property value. The swap requests for shifts in the schedule.

Returns:

  • a swap_shifts_change_request



289
290
291
# File 'lib/models/schedule.rb', line 289

def swap_shifts_change_requests
    return @swap_shifts_change_requests
end

#swap_shifts_change_requests=(value) ⇒ Object

Sets the swapShiftsChangeRequests property value. The swap requests for shifts in the schedule.

Parameters:

  • value

    Value to set for the swapShiftsChangeRequests property.

Returns:

  • a void



297
298
299
# File 'lib/models/schedule.rb', line 297

def swap_shifts_change_requests=(value)
    @swap_shifts_change_requests = value
end

#swap_shifts_requests_enabledObject

Gets the swapShiftsRequestsEnabled property value. Indicates whether swap shifts requests are enabled for the schedule.

Returns:

  • a boolean



304
305
306
# File 'lib/models/schedule.rb', line 304

def swap_shifts_requests_enabled
    return @swap_shifts_requests_enabled
end

#swap_shifts_requests_enabled=(value) ⇒ Object

Sets the swapShiftsRequestsEnabled property value. Indicates whether swap shifts requests are enabled for the schedule.

Parameters:

  • value

    Value to set for the swapShiftsRequestsEnabled property.

Returns:

  • a void



312
313
314
# File 'lib/models/schedule.rb', line 312

def swap_shifts_requests_enabled=(value)
    @swap_shifts_requests_enabled = value
end

#time_clock_enabledObject

Gets the timeClockEnabled property value. Indicates whether time clock is enabled for the schedule.

Returns:

  • a boolean



319
320
321
# File 'lib/models/schedule.rb', line 319

def time_clock_enabled
    return @time_clock_enabled
end

#time_clock_enabled=(value) ⇒ Object

Sets the timeClockEnabled property value. Indicates whether time clock is enabled for the schedule.

Parameters:

  • value

    Value to set for the timeClockEnabled property.

Returns:

  • a void



327
328
329
# File 'lib/models/schedule.rb', line 327

def time_clock_enabled=(value)
    @time_clock_enabled = value
end

#time_off_reasonsObject

Gets the timeOffReasons property value. The set of reasons for a time off in the schedule.

Returns:

  • a time_off_reason



334
335
336
# File 'lib/models/schedule.rb', line 334

def time_off_reasons
    return @time_off_reasons
end

#time_off_reasons=(value) ⇒ Object

Sets the timeOffReasons property value. The set of reasons for a time off in the schedule.

Parameters:

  • value

    Value to set for the timeOffReasons property.

Returns:

  • a void



342
343
344
# File 'lib/models/schedule.rb', line 342

def time_off_reasons=(value)
    @time_off_reasons = value
end

#time_off_requestsObject

Gets the timeOffRequests property value. The time off requests in the schedule.

Returns:

  • a time_off_request



349
350
351
# File 'lib/models/schedule.rb', line 349

def time_off_requests
    return @time_off_requests
end

#time_off_requests=(value) ⇒ Object

Sets the timeOffRequests property value. The time off requests in the schedule.

Parameters:

  • value

    Value to set for the timeOffRequests property.

Returns:

  • a void



357
358
359
# File 'lib/models/schedule.rb', line 357

def time_off_requests=(value)
    @time_off_requests = value
end

#time_off_requests_enabledObject

Gets the timeOffRequestsEnabled property value. Indicates whether time off requests are enabled for the schedule.

Returns:

  • a boolean



364
365
366
# File 'lib/models/schedule.rb', line 364

def time_off_requests_enabled
    return @time_off_requests_enabled
end

#time_off_requests_enabled=(value) ⇒ Object

Sets the timeOffRequestsEnabled property value. Indicates whether time off requests are enabled for the schedule.

Parameters:

  • value

    Value to set for the timeOffRequestsEnabled property.

Returns:

  • a void



372
373
374
# File 'lib/models/schedule.rb', line 372

def time_off_requests_enabled=(value)
    @time_off_requests_enabled = value
end

#time_zoneObject

Gets the timeZone property value. Indicates the time zone of the schedule team using tz database format. Required.

Returns:

  • a string



379
380
381
# File 'lib/models/schedule.rb', line 379

def time_zone
    return @time_zone
end

#time_zone=(value) ⇒ Object

Sets the timeZone property value. Indicates the time zone of the schedule team using tz database format. Required.

Parameters:

  • value

    Value to set for the timeZone property.

Returns:

  • a void



387
388
389
# File 'lib/models/schedule.rb', line 387

def time_zone=(value)
    @time_zone = value
end

#times_offObject

Gets the timesOff property value. The instances of times off in the schedule.

Returns:

  • a time_off



394
395
396
# File 'lib/models/schedule.rb', line 394

def times_off
    return @times_off
end

#times_off=(value) ⇒ Object

Sets the timesOff property value. The instances of times off in the schedule.

Parameters:

  • value

    Value to set for the timesOff property.

Returns:

  • a void



402
403
404
# File 'lib/models/schedule.rb', line 402

def times_off=(value)
    @times_off = value
end

#workforce_integration_idsObject

Gets the workforceIntegrationIds property value. The workforceIntegrationIds property

Returns:

  • a string



409
410
411
# File 'lib/models/schedule.rb', line 409

def workforce_integration_ids
    return @workforce_integration_ids
end

#workforce_integration_ids=(value) ⇒ Object

Sets the workforceIntegrationIds property value. The workforceIntegrationIds property

Parameters:

  • value

    Value to set for the workforceIntegrationIds property.

Returns:

  • a void



417
418
419
# File 'lib/models/schedule.rb', line 417

def workforce_integration_ids=(value)
    @workforce_integration_ids = value
end