Class: Google::Apis::ContactcenteraiplatformV1alpha1::ShiftTemplate

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb,
lib/google/apis/contactcenteraiplatform_v1alpha1/representations.rb,
lib/google/apis/contactcenteraiplatform_v1alpha1/representations.rb

Overview

Template specifying rules for generating shifts. A shift is a unit of work that specifies a start time, end time, and may contain events (e.g. lunch, breaks etc.). Shifts will be assigned to specific dates in the response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ShiftTemplate

Returns a new instance of ShiftTemplate.



1275
1276
1277
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1275

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#assignable_employee_idsArray<String>

Optional. A list of specific employee IDs that can be assigned to shifts generated by this template. If this field is present, there will be EmployeeSchedules in the response for which the EmployeeSchedule.employee_id field is set to one of the IDs in this list. The number of employee schedules with an assigned employee ID will be between minimum_employee_count and maximum_employee_count. If this field is empty, between minimum_employee_count and maximum_employee_count employees can be assigned to shifts generated by this template and the employee schedules won't have an assigned employee ID. Currently, only one assignable employee ID is supported. Corresponds to the JSON property assignableEmployeeIds

Returns:

  • (Array<String>)


1204
1205
1206
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1204

def assignable_employee_ids
  @assignable_employee_ids
end

#days_off_count_per_weekFixnum

Optional. Fixed number of days off per week. An employee has a given day off if they are not assigned to a shift that starts on that day. A week is 7 days and begins on Sunday. Corresponds to the JSON property daysOffCountPerWeek

Returns:

  • (Fixnum)


1211
1212
1213
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1211

def days_off_count_per_week
  @days_off_count_per_week
end

#days_off_datesGoogle::Apis::ContactcenteraiplatformV1alpha1::DateList

List of dates. Corresponds to the JSON property daysOffDates



1216
1217
1218
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1216

def days_off_dates
  @days_off_dates
end

#duration_minutesFixnum

Required. Fixed duration of a shift generated by this template. Corresponds to the JSON property durationMinutes

Returns:

  • (Fixnum)


1221
1222
1223
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1221

def duration_minutes
  @duration_minutes
end

#earliest_start_timeGoogle::Apis::ContactcenteraiplatformV1alpha1::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property earliestStartTime



1228
1229
1230
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1228

def earliest_start_time
  @earliest_start_time
end

#event_templatesArray<Google::Apis::ContactcenteraiplatformV1alpha1::EventTemplate>

Optional. Rules for generating events for each shift. Exactly one event will be included in each shift for each EventTemplate specified. Corresponds to the JSON property eventTemplates



1234
1235
1236
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1234

def event_templates
  @event_templates
end

#idString

Required. Unique ID of this template. Corresponds to the JSON property id

Returns:

  • (String)


1239
1240
1241
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1239

def id
  @id
end

#latest_start_timeGoogle::Apis::ContactcenteraiplatformV1alpha1::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property latestStartTime



1246
1247
1248
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1246

def latest_start_time
  @latest_start_time
end

#maximum_employee_countFixnum

Required. Maximum number of employees that can be assigned to all shifts generated by this template on working days. Corresponds to the JSON property maximumEmployeeCount

Returns:

  • (Fixnum)


1252
1253
1254
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1252

def maximum_employee_count
  @maximum_employee_count
end

#minimum_employee_countFixnum

Optional. Minimum number of employees that can be assigned to all shifts generated by this template on working days. Corresponds to the JSON property minimumEmployeeCount

Returns:

  • (Fixnum)


1258
1259
1260
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1258

def minimum_employee_count
  @minimum_employee_count
end

#minimum_interevent_gap_minutesFixnum

Optional. Minimum minutes between the end of one event and the start of the next. Corresponds to the JSON property minimumIntereventGapMinutes

Returns:

  • (Fixnum)


1264
1265
1266
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1264

def minimum_interevent_gap_minutes
  @minimum_interevent_gap_minutes
end

#start_time_increment_minutesFixnum

Optional. The time increment (in minutes) used to generate the set of possible start times between earliest_start_time and latest_start_time. For example, if the earliest start time is 8:00, the latest start time is 8:30, and the start time increment is 10 minutes, then all possible start times for this shift template are: 8:00, 8:10, 8:20, and 8:30. Corresponds to the JSON property startTimeIncrementMinutes

Returns:

  • (Fixnum)


1273
1274
1275
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1273

def start_time_increment_minutes
  @start_time_increment_minutes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
# File 'lib/google/apis/contactcenteraiplatform_v1alpha1/classes.rb', line 1280

def update!(**args)
  @assignable_employee_ids = args[:assignable_employee_ids] if args.key?(:assignable_employee_ids)
  @days_off_count_per_week = args[:days_off_count_per_week] if args.key?(:days_off_count_per_week)
  @days_off_dates = args[:days_off_dates] if args.key?(:days_off_dates)
  @duration_minutes = args[:duration_minutes] if args.key?(:duration_minutes)
  @earliest_start_time = args[:earliest_start_time] if args.key?(:earliest_start_time)
  @event_templates = args[:event_templates] if args.key?(:event_templates)
  @id = args[:id] if args.key?(:id)
  @latest_start_time = args[:latest_start_time] if args.key?(:latest_start_time)
  @maximum_employee_count = args[:maximum_employee_count] if args.key?(:maximum_employee_count)
  @minimum_employee_count = args[:minimum_employee_count] if args.key?(:minimum_employee_count)
  @minimum_interevent_gap_minutes = args[:minimum_interevent_gap_minutes] if args.key?(:minimum_interevent_gap_minutes)
  @start_time_increment_minutes = args[:start_time_increment_minutes] if args.key?(:start_time_increment_minutes)
end