purecloudplatformclientv2 36.1.0 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/AgentTimeOffRequestPatch.md +15 -0
- data/docs/AnalyticsApi.md +2 -2
- data/docs/AsgInfoResponse.md +2 -2
- data/docs/AsyncWeekScheduleResponse.md +16 -0
- data/docs/CallMediaPolicyConditions.md +1 -0
- data/docs/CampaignNotification.md +1 -0
- data/docs/ChatMediaPolicyConditions.md +1 -0
- data/docs/ConversationNotificationMedia.md +3 -0
- data/docs/ConversationNotificationMessageDetails.md +1 -0
- data/docs/ConversationNotificationMessageMedia.md +3 -0
- data/docs/ConversationNotificationMessageSticker.md +14 -0
- data/docs/ConversationNotificationMessages.md +1 -0
- data/docs/ConversationNotificationStickers.md +14 -0
- data/docs/CopyShortTermForecastRequest.md +14 -0
- data/docs/CopyWeekScheduleRequest.md +14 -0
- data/docs/CopyWorkPlan.md +13 -0
- data/docs/CreateAdminTimeOffRequest.md +19 -0
- data/docs/CreateAgentTimeOffRequest.md +17 -0
- data/docs/CreateAsgRequest.md +1 -1
- data/docs/CreateManagementUnitApiRequest.md +17 -0
- data/docs/CreateManagementUnitSettings.md +16 -0
- data/docs/CreateQueueMediaAssociationRequest.md +14 -0
- data/docs/CreateServiceGoalGroupRequest.md +15 -0
- data/docs/CreateWorkPlan.md +26 -0
- data/docs/CreateWorkPlanActivity.md +23 -0
- data/docs/CreateWorkPlanShift.md +29 -0
- data/docs/CurrentUserScheduleRequestBody.md +14 -0
- data/docs/DateRange.md +14 -0
- data/docs/DeletableUserReference.md +15 -0
- data/docs/EmailMediaPolicyConditions.md +1 -0
- data/docs/ExternalContact.md +3 -1
- data/docs/ExternalOrganization.md +1 -1
- data/docs/FacebookId.md +14 -0
- data/docs/FacebookScopedId.md +13 -0
- data/docs/FlowOutcomeNotificationNotification.md +16 -0
- data/docs/FlowOutcomeNotificationNotificationArchitectOperation.md +21 -0
- data/docs/FlowOutcomeNotificationNotificationErrorDetail.md +16 -0
- data/docs/FlowOutcomeNotificationNotificationErrorMessageParams.md +13 -0
- data/docs/{SurveyFormUriReference.md → FlowOutcomeNotificationNotificationHomeOrganization.md} +3 -4
- data/docs/FlowOutcomeNotificationNotificationUser.md +15 -0
- data/docs/ForecastGenerationResult.md +13 -0
- data/docs/ForecastGenerationRouteGroupResult.md +14 -0
- data/docs/ForecastResultResponse.md +14 -0
- data/docs/ForecastSourceDayPointer.md +17 -0
- data/docs/ForecastTimeSeriesResult.md +14 -0
- data/docs/GenerateShortTermForecastRequest.md +13 -0
- data/docs/GenerateShortTermForecastResponse.md +16 -0
- data/docs/GenerateWeekScheduleRequest.md +14 -0
- data/docs/GenerateWeekScheduleResponse.md +15 -0
- data/docs/GroupsApi.md +2 -0
- data/docs/HeadcountForecastResponse.md +14 -0
- data/docs/HeadcountIntervalResponse.md +14 -0
- data/docs/ImportShortTermForecastRequest.md +16 -0
- data/docs/ImportWeekScheduleRequest.md +17 -0
- data/docs/IntradayDataUpdateNotificationDateTime.md +1 -1
- data/docs/IntradayDataUpdateNotificationStartDate.md +1 -1
- data/docs/JsonNode.md +1 -1
- data/docs/LanguageReference.md +14 -0
- data/docs/LineId.md +14 -0
- data/docs/LineUserId.md +13 -0
- data/docs/ListWrapperForecastSourceDayPointer.md +13 -0
- data/docs/ListWrapperShiftStartVariance.md +13 -0
- data/docs/ListWrapperWfmForecastModification.md +13 -0
- data/docs/MessageConversationNotificationMessageDetails.md +1 -0
- data/docs/MessageConversationNotificationMessageMedia.md +3 -0
- data/docs/MessageConversationNotificationMessageSticker.md +14 -0
- data/docs/MessageConversationNotificationMessages.md +1 -0
- data/docs/MessageMediaPolicyConditions.md +1 -0
- data/docs/OrgUser.md +1 -0
- data/docs/OutboundApi.md +70 -0
- data/docs/PartialUploadResponse.md +13 -0
- data/docs/PatchUser.md +0 -1
- data/docs/PublishedSurveyFormReference.md +16 -0
- data/docs/QueryDivision.md +12 -0
- data/docs/QueueMediaAssociation.md +16 -0
- data/docs/QueueReference.md +14 -0
- data/docs/RecordingMessagingMessage.md +1 -0
- data/docs/RouteGroup.md +18 -0
- data/docs/RouteGroupAttributes.md +16 -0
- data/docs/RouteGroupList.md +14 -0
- data/docs/RoutingApi.md +8 -8
- data/docs/RoutingSkillReference.md +14 -0
- data/docs/ScheduleGenerationWarning.md +20 -0
- data/docs/SchedulingRunListResponse.md +13 -0
- data/docs/SchedulingRunResponse.md +22 -0
- data/docs/ServiceGoalGroup.md +18 -0
- data/docs/ServiceGoalGroupGoals.md +14 -0
- data/docs/ServiceGoalGroupList.md +14 -0
- data/docs/SetWrapperDayOfWeek.md +13 -0
- data/docs/ShiftStartVariance.md +14 -0
- data/docs/ShortTermForecast.md +22 -0
- data/docs/ShortTermForecastListItemResponse.md +18 -0
- data/docs/ShortTermForecastListResponse.md +13 -0
- data/docs/ShortTermForecastReference.md +16 -0
- data/docs/ShortTermForecastResponse.md +15 -0
- data/docs/SurveyAssignment.md +3 -1
- data/docs/SurveyForm.md +1 -0
- data/docs/TimeOffRequestEntityList.md +13 -0
- data/docs/TimeOffRequestLookup.md +15 -0
- data/docs/TimeOffRequestLookupList.md +13 -0
- data/docs/TimeOffRequestQueryBody.md +15 -0
- data/docs/TrustUser.md +1 -0
- data/docs/TrusteeAuthorization.md +13 -0
- data/docs/Trustor.md +1 -0
- data/docs/UpdateActivityCodeRequest.md +19 -0
- data/docs/UpdateWeekScheduleRequest.md +18 -0
- data/docs/User.md +1 -0
- data/docs/UserMe.md +1 -0
- data/docs/UserScheduleAdherenceUpdateNotificationDateTime.md +1 -1
- data/docs/UserSchedulesPartialUploadRequest.md +13 -0
- data/docs/UsersApi.md +5 -6
- data/docs/ViewFilter.md +4 -0
- data/docs/WeekSchedule.md +23 -0
- data/docs/WeekScheduleGenerationResult.md +16 -0
- data/docs/WeekScheduleListItemResponse.md +20 -0
- data/docs/WeekScheduleListResponse.md +13 -0
- data/docs/WeekScheduleResponse.md +14 -0
- data/docs/WfmAgent.md +22 -0
- data/docs/WfmAverageSpeedOfAnswer.md +14 -0
- data/docs/WfmForecastModification.md +20 -0
- data/docs/WfmForecastModificationAttributes.md +16 -0
- data/docs/WfmForecastModificationIntervalOffsetValue.md +14 -0
- data/docs/WfmHistoricalAdherenceQuery.md +1 -1
- data/docs/WfmHistoricalAdherenceQueryForUsers.md +17 -0
- data/docs/WfmServiceLevel.md +15 -0
- data/docs/WfmTimeZone.md +13 -0
- data/docs/WorkPlan.md +29 -0
- data/docs/WorkPlanActivity.md +25 -0
- data/docs/WorkPlanListItemResponse.md +21 -0
- data/docs/WorkPlanListResponse.md +13 -0
- data/docs/WorkPlanReference.md +13 -0
- data/docs/WorkPlanShift.md +31 -0
- data/docs/WorkforceManagementApi.md +3557 -187
- data/lib/purecloudplatformclientv2.rb +96 -1
- data/lib/purecloudplatformclientv2/api/outbound_api.rb +83 -0
- data/lib/purecloudplatformclientv2/api/routing_api.rb +8 -8
- data/lib/purecloudplatformclientv2/api/users_api.rb +8 -6
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +3993 -288
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/agent_time_off_request_patch.rb +268 -0
- data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/asg_info_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/async_week_schedule_response.rb +294 -0
- data/lib/purecloudplatformclientv2/models/call_media_policy_conditions.rb +28 -1
- data/lib/purecloudplatformclientv2/models/campaign_notification.rb +26 -1
- data/lib/purecloudplatformclientv2/models/chat_media_policy_conditions.rb +28 -1
- data/lib/purecloudplatformclientv2/models/conversation_notification_media.rb +79 -4
- data/lib/purecloudplatformclientv2/models/conversation_notification_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_notification_message_details.rb +31 -4
- data/lib/purecloudplatformclientv2/models/conversation_notification_message_media.rb +79 -4
- data/lib/purecloudplatformclientv2/models/conversation_notification_message_sticker.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_messages.rb +31 -4
- data/lib/purecloudplatformclientv2/models/conversation_notification_messages_1.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_notification_stickers.rb +226 -0
- data/lib/purecloudplatformclientv2/models/copy_short_term_forecast_request.rb +239 -0
- data/lib/purecloudplatformclientv2/models/copy_week_schedule_request.rb +238 -0
- data/lib/purecloudplatformclientv2/models/copy_work_plan.rb +208 -0
- data/lib/purecloudplatformclientv2/models/create_admin_time_off_request.rb +398 -0
- data/lib/purecloudplatformclientv2/models/create_agent_time_off_request.rb +320 -0
- data/lib/purecloudplatformclientv2/models/create_asg_request.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_management_unit_api_request.rb +336 -0
- data/lib/purecloudplatformclientv2/models/create_management_unit_settings.rb +281 -0
- data/lib/purecloudplatformclientv2/models/create_queue_media_association_request.rb +231 -0
- data/lib/purecloudplatformclientv2/models/create_service_goal_group_request.rb +262 -0
- data/lib/purecloudplatformclientv2/models/create_work_plan.rb +550 -0
- data/lib/purecloudplatformclientv2/models/create_work_plan_activity.rb +463 -0
- data/lib/purecloudplatformclientv2/models/create_work_plan_shift.rb +626 -0
- data/lib/purecloudplatformclientv2/models/current_user_schedule_request_body.rb +239 -0
- data/lib/purecloudplatformclientv2/models/data_export_notification_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/models/date_range.rb +228 -0
- data/lib/purecloudplatformclientv2/models/deletable_user_reference.rb +255 -0
- data/lib/purecloudplatformclientv2/models/email_media_policy_conditions.rb +28 -1
- data/lib/purecloudplatformclientv2/models/external_contact.rb +52 -2
- data/lib/purecloudplatformclientv2/models/external_organization.rb +1 -1
- data/lib/purecloudplatformclientv2/models/facebook_id.rb +231 -0
- data/lib/purecloudplatformclientv2/models/facebook_scoped_id.rb +203 -0
- data/lib/purecloudplatformclientv2/models/flow_notification_notification_architect_operation.rb +2 -2
- data/lib/purecloudplatformclientv2/models/flow_outcome_notification_notification.rb +276 -0
- data/lib/purecloudplatformclientv2/models/flow_outcome_notification_notification_architect_operation.rb +431 -0
- data/lib/purecloudplatformclientv2/models/flow_outcome_notification_notification_error_detail.rb +276 -0
- data/lib/purecloudplatformclientv2/models/flow_outcome_notification_notification_error_message_params.rb +203 -0
- data/lib/purecloudplatformclientv2/models/flow_outcome_notification_notification_home_organization.rb +251 -0
- data/lib/purecloudplatformclientv2/models/flow_outcome_notification_notification_user.rb +251 -0
- data/lib/purecloudplatformclientv2/models/forecast_generation_result.rb +204 -0
- data/lib/purecloudplatformclientv2/models/forecast_generation_route_group_result.rb +230 -0
- data/lib/purecloudplatformclientv2/models/forecast_result_response.rb +228 -0
- data/lib/purecloudplatformclientv2/models/forecast_source_day_pointer.rb +321 -0
- data/lib/purecloudplatformclientv2/models/forecast_time_series_result.rb +256 -0
- data/lib/purecloudplatformclientv2/models/generate_short_term_forecast_request.rb +207 -0
- data/lib/purecloudplatformclientv2/models/generate_short_term_forecast_response.rb +294 -0
- data/lib/purecloudplatformclientv2/models/generate_week_schedule_request.rb +239 -0
- data/lib/purecloudplatformclientv2/models/generate_week_schedule_response.rb +268 -0
- data/lib/purecloudplatformclientv2/models/headcount_forecast_response.rb +233 -0
- data/lib/purecloudplatformclientv2/models/headcount_interval_response.rb +229 -0
- data/lib/purecloudplatformclientv2/models/import_short_term_forecast_request.rb +293 -0
- data/lib/purecloudplatformclientv2/models/import_week_schedule_request.rb +316 -0
- data/lib/purecloudplatformclientv2/models/intraday_data_update_notification_date_time.rb +17 -17
- data/lib/purecloudplatformclientv2/models/intraday_data_update_notification_start_date.rb +17 -17
- data/lib/purecloudplatformclientv2/models/json_node.rb +17 -17
- data/lib/purecloudplatformclientv2/models/language_reference.rb +228 -0
- data/lib/purecloudplatformclientv2/models/line_id.rb +231 -0
- data/lib/purecloudplatformclientv2/models/line_user_id.rb +203 -0
- data/lib/purecloudplatformclientv2/models/list_wrapper_forecast_source_day_pointer.rb +203 -0
- data/lib/purecloudplatformclientv2/models/list_wrapper_shift_start_variance.rb +203 -0
- data/lib/purecloudplatformclientv2/models/list_wrapper_wfm_forecast_modification.rb +203 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_details.rb +31 -4
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_media.rb +79 -4
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_media_participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_sticker.rb +226 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_messages.rb +31 -4
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_participants.rb +2 -2
- data/lib/purecloudplatformclientv2/models/message_media_policy_conditions.rb +28 -1
- data/lib/purecloudplatformclientv2/models/org_user.rb +27 -1
- data/lib/purecloudplatformclientv2/models/partial_upload_response.rb +202 -0
- data/lib/purecloudplatformclientv2/models/patch_user.rb +1 -26
- data/lib/purecloudplatformclientv2/models/prompt_notification_notification_architect_operation.rb +2 -2
- data/lib/purecloudplatformclientv2/models/prompt_notification_notification_current_operation.rb +2 -2
- data/lib/purecloudplatformclientv2/models/{survey_form_uri_reference.rb → published_survey_form_reference.rb} +16 -14
- data/lib/purecloudplatformclientv2/models/query_division.rb +176 -0
- data/lib/purecloudplatformclientv2/models/queue_media_association.rb +283 -0
- data/lib/purecloudplatformclientv2/models/queue_reference.rb +228 -0
- data/lib/purecloudplatformclientv2/models/recording_messaging_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/reporting_export_job_request.rb +2 -2
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/route_group.rb +363 -0
- data/lib/purecloudplatformclientv2/models/route_group_attributes.rb +307 -0
- data/lib/purecloudplatformclientv2/models/route_group_list.rb +235 -0
- data/lib/purecloudplatformclientv2/models/routing_skill_reference.rb +228 -0
- data/lib/purecloudplatformclientv2/models/schedule_generation_warning.rb +389 -0
- data/lib/purecloudplatformclientv2/models/scheduling_run_list_response.rb +203 -0
- data/lib/purecloudplatformclientv2/models/scheduling_run_response.rb +451 -0
- data/lib/purecloudplatformclientv2/models/service_goal_group.rb +339 -0
- data/lib/purecloudplatformclientv2/models/service_goal_group_goals.rb +239 -0
- data/lib/purecloudplatformclientv2/models/service_goal_group_list.rb +230 -0
- data/lib/purecloudplatformclientv2/models/set_wrapper_day_of_week.rb +203 -0
- data/lib/purecloudplatformclientv2/models/shift_start_variance.rb +241 -0
- data/lib/purecloudplatformclientv2/models/short_term_forecast.rb +466 -0
- data/lib/purecloudplatformclientv2/models/short_term_forecast_list_item_response.rb +362 -0
- data/lib/purecloudplatformclientv2/models/short_term_forecast_list_response.rb +203 -0
- data/lib/purecloudplatformclientv2/models/short_term_forecast_reference.rb +291 -0
- data/lib/purecloudplatformclientv2/models/short_term_forecast_response.rb +268 -0
- data/lib/purecloudplatformclientv2/models/survey_assignment.rb +62 -5
- data/lib/purecloudplatformclientv2/models/survey_form.rb +32 -1
- data/lib/purecloudplatformclientv2/models/time_off_request_entity_list.rb +203 -0
- data/lib/purecloudplatformclientv2/models/time_off_request_lookup.rb +264 -0
- data/lib/purecloudplatformclientv2/models/time_off_request_lookup_list.rb +209 -0
- data/lib/purecloudplatformclientv2/models/time_off_request_query_body.rb +258 -0
- data/lib/purecloudplatformclientv2/models/trust_user.rb +27 -1
- data/lib/purecloudplatformclientv2/models/trustee_authorization.rb +204 -0
- data/lib/purecloudplatformclientv2/models/trustor.rb +27 -1
- data/lib/purecloudplatformclientv2/models/update_activity_code_request.rb +378 -0
- data/lib/purecloudplatformclientv2/models/update_week_schedule_request.rb +346 -0
- data/lib/purecloudplatformclientv2/models/user.rb +27 -1
- data/lib/purecloudplatformclientv2/models/user_me.rb +27 -1
- data/lib/purecloudplatformclientv2/models/user_schedule_adherence_update_notification_date_time.rb +17 -17
- data/lib/purecloudplatformclientv2/models/user_schedules_partial_upload_request.rb +210 -0
- data/lib/purecloudplatformclientv2/models/view_filter.rb +112 -4
- data/lib/purecloudplatformclientv2/models/week_schedule.rb +465 -0
- data/lib/purecloudplatformclientv2/models/week_schedule_generation_result.rb +282 -0
- data/lib/purecloudplatformclientv2/models/week_schedule_list_item_response.rb +384 -0
- data/lib/purecloudplatformclientv2/models/week_schedule_list_response.rb +204 -0
- data/lib/purecloudplatformclientv2/models/week_schedule_response.rb +229 -0
- data/lib/purecloudplatformclientv2/models/wfm_agent.rb +443 -0
- data/lib/purecloudplatformclientv2/models/wfm_average_speed_of_answer.rb +234 -0
- data/lib/purecloudplatformclientv2/models/wfm_forecast_modification.rb +435 -0
- data/lib/purecloudplatformclientv2/models/wfm_forecast_modification_attributes.rb +288 -0
- data/lib/purecloudplatformclientv2/models/wfm_forecast_modification_interval_offset_value.rb +239 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_adherence_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/wfm_historical_adherence_query_for_users.rb +324 -0
- data/lib/purecloudplatformclientv2/models/wfm_service_level.rb +260 -0
- data/lib/purecloudplatformclientv2/models/wfm_time_zone.rb +203 -0
- data/lib/purecloudplatformclientv2/models/work_plan.rb +627 -0
- data/lib/purecloudplatformclientv2/models/work_plan_activity.rb +515 -0
- data/lib/purecloudplatformclientv2/models/work_plan_list_item_response.rb +410 -0
- data/lib/purecloudplatformclientv2/models/work_plan_list_response.rb +203 -0
- data/lib/purecloudplatformclientv2/models/work_plan_reference.rb +207 -0
- data/lib/purecloudplatformclientv2/models/work_plan_shift.rb +678 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +194 -4
@@ -0,0 +1,207 @@
|
|
1
|
+
=begin
|
2
|
+
PureCloud Platform API
|
3
|
+
|
4
|
+
With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: DeveloperEvangelists@genesys.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: ININ
|
11
|
+
http://www.inin.com
|
12
|
+
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class WorkPlanReference
|
21
|
+
# The ID of the work plan
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
|
28
|
+
:'id' => :'id'
|
29
|
+
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.swagger_types
|
35
|
+
{
|
36
|
+
|
37
|
+
:'id' => :'String'
|
38
|
+
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
return unless attributes.is_a?(Hash)
|
46
|
+
|
47
|
+
# convert string to symbol for hash key
|
48
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
49
|
+
|
50
|
+
|
51
|
+
if attributes.has_key?(:'id')
|
52
|
+
|
53
|
+
|
54
|
+
self.id = attributes[:'id']
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properies with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
|
67
|
+
|
68
|
+
return invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
|
75
|
+
|
76
|
+
if @id.nil?
|
77
|
+
return false
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
id == o.id
|
98
|
+
end
|
99
|
+
|
100
|
+
# @see the `==` method
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def eql?(o)
|
103
|
+
self == o
|
104
|
+
end
|
105
|
+
|
106
|
+
# Calculates hash code according to all attributes.
|
107
|
+
# @return [Fixnum] Hash code
|
108
|
+
def hash
|
109
|
+
[id].hash
|
110
|
+
end
|
111
|
+
|
112
|
+
# build the object from hash
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.swagger_types.each_pair do |key, type|
|
116
|
+
if type =~ /^Array<(.*)>/i
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
119
|
+
else
|
120
|
+
#TODO show warning in debug mode
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
else
|
125
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :DateTime
|
135
|
+
DateTime.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :BOOLEAN
|
145
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
166
|
+
_model.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
def to_s
|
171
|
+
to_hash.to_s
|
172
|
+
end
|
173
|
+
|
174
|
+
# to_body is an alias to to_body (backward compatibility))
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# return the object in the form of hash
|
180
|
+
def to_hash
|
181
|
+
hash = {}
|
182
|
+
self.class.attribute_map.each_pair do |attr, param|
|
183
|
+
value = self.send(attr)
|
184
|
+
next if value.nil?
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Method to output non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
def _to_hash(value)
|
193
|
+
if value.is_a?(Array)
|
194
|
+
value.compact.map{ |v| _to_hash(v) }
|
195
|
+
elsif value.is_a?(Hash)
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
198
|
+
end
|
199
|
+
elsif value.respond_to? :to_hash
|
200
|
+
value.to_hash
|
201
|
+
else
|
202
|
+
value
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
end
|
207
|
+
end
|
@@ -0,0 +1,678 @@
|
|
1
|
+
=begin
|
2
|
+
PureCloud Platform API
|
3
|
+
|
4
|
+
With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: DeveloperEvangelists@genesys.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: ININ
|
11
|
+
http://www.inin.com
|
12
|
+
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
# Shift in a work plan
|
21
|
+
class WorkPlanShift
|
22
|
+
# Name of the shift
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
# Days of the week applicable for this shift
|
26
|
+
attr_accessor :days
|
27
|
+
|
28
|
+
# Whether the start time of the shift is flexible
|
29
|
+
attr_accessor :flexible_start_time
|
30
|
+
|
31
|
+
# Exact start time of the shift defined as offset minutes from midnight. Used if flexibleStartTime == false
|
32
|
+
attr_accessor :exact_start_time_minutes_from_midnight
|
33
|
+
|
34
|
+
# Earliest start time of the shift defined as offset minutes from midnight. Used if flexibleStartTime == true
|
35
|
+
attr_accessor :earliest_start_time_minutes_from_midnight
|
36
|
+
|
37
|
+
# Latest start time of the shift defined as offset minutes from midnight. Used if flexibleStartTime == true
|
38
|
+
attr_accessor :latest_start_time_minutes_from_midnight
|
39
|
+
|
40
|
+
# Whether the latest stop time constraint for the shift is enabled
|
41
|
+
attr_accessor :constrain_stop_time
|
42
|
+
|
43
|
+
# Latest stop time of the shift defined as offset minutes from midnight. Used if constrainStopTime == true
|
44
|
+
attr_accessor :latest_stop_time_minutes_from_midnight
|
45
|
+
|
46
|
+
# Increment in offset minutes that would contribute to different possible start times for the shift. Used if flexibleStartTime == true
|
47
|
+
attr_accessor :start_increment_minutes
|
48
|
+
|
49
|
+
# Whether the paid time setting for the shift is flexible
|
50
|
+
attr_accessor :flexible_paid_time
|
51
|
+
|
52
|
+
# Exact paid time in minutes configured for the shift. Used if flexiblePaidTime == false
|
53
|
+
attr_accessor :exact_paid_time_minutes
|
54
|
+
|
55
|
+
# Minimum paid time in minutes configured for the shift. Used if flexiblePaidTime == true
|
56
|
+
attr_accessor :minimum_paid_time_minutes
|
57
|
+
|
58
|
+
# Maximum paid time in minutes configured for the shift. Used if flexiblePaidTime == true
|
59
|
+
attr_accessor :maximum_paid_time_minutes
|
60
|
+
|
61
|
+
# Whether the contiguous time constraint for the shift is enabled
|
62
|
+
attr_accessor :constrain_contiguous_work_time
|
63
|
+
|
64
|
+
# Minimum contiguous time in minutes configured for the shift. Used if constrainContiguousWorkTime == true
|
65
|
+
attr_accessor :minimum_contiguous_work_time_minutes
|
66
|
+
|
67
|
+
# Maximum contiguous time in minutes configured for the shift. Used if constrainContiguousWorkTime == true
|
68
|
+
attr_accessor :maximum_contiguous_work_time_minutes
|
69
|
+
|
70
|
+
# Activities configured for this shift
|
71
|
+
attr_accessor :activities
|
72
|
+
|
73
|
+
# ID of the shift. This is required only for the case of updating an existing shift
|
74
|
+
attr_accessor :id
|
75
|
+
|
76
|
+
# If marked true for updating an existing shift, the shift will be permanently deleted
|
77
|
+
attr_accessor :delete
|
78
|
+
|
79
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
80
|
+
def self.attribute_map
|
81
|
+
{
|
82
|
+
|
83
|
+
:'name' => :'name',
|
84
|
+
|
85
|
+
:'days' => :'days',
|
86
|
+
|
87
|
+
:'flexible_start_time' => :'flexibleStartTime',
|
88
|
+
|
89
|
+
:'exact_start_time_minutes_from_midnight' => :'exactStartTimeMinutesFromMidnight',
|
90
|
+
|
91
|
+
:'earliest_start_time_minutes_from_midnight' => :'earliestStartTimeMinutesFromMidnight',
|
92
|
+
|
93
|
+
:'latest_start_time_minutes_from_midnight' => :'latestStartTimeMinutesFromMidnight',
|
94
|
+
|
95
|
+
:'constrain_stop_time' => :'constrainStopTime',
|
96
|
+
|
97
|
+
:'latest_stop_time_minutes_from_midnight' => :'latestStopTimeMinutesFromMidnight',
|
98
|
+
|
99
|
+
:'start_increment_minutes' => :'startIncrementMinutes',
|
100
|
+
|
101
|
+
:'flexible_paid_time' => :'flexiblePaidTime',
|
102
|
+
|
103
|
+
:'exact_paid_time_minutes' => :'exactPaidTimeMinutes',
|
104
|
+
|
105
|
+
:'minimum_paid_time_minutes' => :'minimumPaidTimeMinutes',
|
106
|
+
|
107
|
+
:'maximum_paid_time_minutes' => :'maximumPaidTimeMinutes',
|
108
|
+
|
109
|
+
:'constrain_contiguous_work_time' => :'constrainContiguousWorkTime',
|
110
|
+
|
111
|
+
:'minimum_contiguous_work_time_minutes' => :'minimumContiguousWorkTimeMinutes',
|
112
|
+
|
113
|
+
:'maximum_contiguous_work_time_minutes' => :'maximumContiguousWorkTimeMinutes',
|
114
|
+
|
115
|
+
:'activities' => :'activities',
|
116
|
+
|
117
|
+
:'id' => :'id',
|
118
|
+
|
119
|
+
:'delete' => :'delete'
|
120
|
+
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
# Attribute type mapping.
|
125
|
+
def self.swagger_types
|
126
|
+
{
|
127
|
+
|
128
|
+
:'name' => :'String',
|
129
|
+
|
130
|
+
:'days' => :'SetWrapperDayOfWeek',
|
131
|
+
|
132
|
+
:'flexible_start_time' => :'BOOLEAN',
|
133
|
+
|
134
|
+
:'exact_start_time_minutes_from_midnight' => :'Integer',
|
135
|
+
|
136
|
+
:'earliest_start_time_minutes_from_midnight' => :'Integer',
|
137
|
+
|
138
|
+
:'latest_start_time_minutes_from_midnight' => :'Integer',
|
139
|
+
|
140
|
+
:'constrain_stop_time' => :'BOOLEAN',
|
141
|
+
|
142
|
+
:'latest_stop_time_minutes_from_midnight' => :'Integer',
|
143
|
+
|
144
|
+
:'start_increment_minutes' => :'Integer',
|
145
|
+
|
146
|
+
:'flexible_paid_time' => :'BOOLEAN',
|
147
|
+
|
148
|
+
:'exact_paid_time_minutes' => :'Integer',
|
149
|
+
|
150
|
+
:'minimum_paid_time_minutes' => :'Integer',
|
151
|
+
|
152
|
+
:'maximum_paid_time_minutes' => :'Integer',
|
153
|
+
|
154
|
+
:'constrain_contiguous_work_time' => :'BOOLEAN',
|
155
|
+
|
156
|
+
:'minimum_contiguous_work_time_minutes' => :'Integer',
|
157
|
+
|
158
|
+
:'maximum_contiguous_work_time_minutes' => :'Integer',
|
159
|
+
|
160
|
+
:'activities' => :'Array<WorkPlanActivity>',
|
161
|
+
|
162
|
+
:'id' => :'String',
|
163
|
+
|
164
|
+
:'delete' => :'BOOLEAN'
|
165
|
+
|
166
|
+
}
|
167
|
+
end
|
168
|
+
|
169
|
+
# Initializes the object
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
def initialize(attributes = {})
|
172
|
+
return unless attributes.is_a?(Hash)
|
173
|
+
|
174
|
+
# convert string to symbol for hash key
|
175
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
176
|
+
|
177
|
+
|
178
|
+
if attributes.has_key?(:'name')
|
179
|
+
|
180
|
+
|
181
|
+
self.name = attributes[:'name']
|
182
|
+
|
183
|
+
|
184
|
+
end
|
185
|
+
|
186
|
+
|
187
|
+
if attributes.has_key?(:'days')
|
188
|
+
|
189
|
+
|
190
|
+
self.days = attributes[:'days']
|
191
|
+
|
192
|
+
|
193
|
+
end
|
194
|
+
|
195
|
+
|
196
|
+
if attributes.has_key?(:'flexibleStartTime')
|
197
|
+
|
198
|
+
|
199
|
+
self.flexible_start_time = attributes[:'flexibleStartTime']
|
200
|
+
|
201
|
+
|
202
|
+
end
|
203
|
+
|
204
|
+
|
205
|
+
if attributes.has_key?(:'exactStartTimeMinutesFromMidnight')
|
206
|
+
|
207
|
+
|
208
|
+
self.exact_start_time_minutes_from_midnight = attributes[:'exactStartTimeMinutesFromMidnight']
|
209
|
+
|
210
|
+
|
211
|
+
end
|
212
|
+
|
213
|
+
|
214
|
+
if attributes.has_key?(:'earliestStartTimeMinutesFromMidnight')
|
215
|
+
|
216
|
+
|
217
|
+
self.earliest_start_time_minutes_from_midnight = attributes[:'earliestStartTimeMinutesFromMidnight']
|
218
|
+
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
|
223
|
+
if attributes.has_key?(:'latestStartTimeMinutesFromMidnight')
|
224
|
+
|
225
|
+
|
226
|
+
self.latest_start_time_minutes_from_midnight = attributes[:'latestStartTimeMinutesFromMidnight']
|
227
|
+
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
|
232
|
+
if attributes.has_key?(:'constrainStopTime')
|
233
|
+
|
234
|
+
|
235
|
+
self.constrain_stop_time = attributes[:'constrainStopTime']
|
236
|
+
|
237
|
+
|
238
|
+
end
|
239
|
+
|
240
|
+
|
241
|
+
if attributes.has_key?(:'latestStopTimeMinutesFromMidnight')
|
242
|
+
|
243
|
+
|
244
|
+
self.latest_stop_time_minutes_from_midnight = attributes[:'latestStopTimeMinutesFromMidnight']
|
245
|
+
|
246
|
+
|
247
|
+
end
|
248
|
+
|
249
|
+
|
250
|
+
if attributes.has_key?(:'startIncrementMinutes')
|
251
|
+
|
252
|
+
|
253
|
+
self.start_increment_minutes = attributes[:'startIncrementMinutes']
|
254
|
+
|
255
|
+
|
256
|
+
end
|
257
|
+
|
258
|
+
|
259
|
+
if attributes.has_key?(:'flexiblePaidTime')
|
260
|
+
|
261
|
+
|
262
|
+
self.flexible_paid_time = attributes[:'flexiblePaidTime']
|
263
|
+
|
264
|
+
|
265
|
+
end
|
266
|
+
|
267
|
+
|
268
|
+
if attributes.has_key?(:'exactPaidTimeMinutes')
|
269
|
+
|
270
|
+
|
271
|
+
self.exact_paid_time_minutes = attributes[:'exactPaidTimeMinutes']
|
272
|
+
|
273
|
+
|
274
|
+
end
|
275
|
+
|
276
|
+
|
277
|
+
if attributes.has_key?(:'minimumPaidTimeMinutes')
|
278
|
+
|
279
|
+
|
280
|
+
self.minimum_paid_time_minutes = attributes[:'minimumPaidTimeMinutes']
|
281
|
+
|
282
|
+
|
283
|
+
end
|
284
|
+
|
285
|
+
|
286
|
+
if attributes.has_key?(:'maximumPaidTimeMinutes')
|
287
|
+
|
288
|
+
|
289
|
+
self.maximum_paid_time_minutes = attributes[:'maximumPaidTimeMinutes']
|
290
|
+
|
291
|
+
|
292
|
+
end
|
293
|
+
|
294
|
+
|
295
|
+
if attributes.has_key?(:'constrainContiguousWorkTime')
|
296
|
+
|
297
|
+
|
298
|
+
self.constrain_contiguous_work_time = attributes[:'constrainContiguousWorkTime']
|
299
|
+
|
300
|
+
|
301
|
+
end
|
302
|
+
|
303
|
+
|
304
|
+
if attributes.has_key?(:'minimumContiguousWorkTimeMinutes')
|
305
|
+
|
306
|
+
|
307
|
+
self.minimum_contiguous_work_time_minutes = attributes[:'minimumContiguousWorkTimeMinutes']
|
308
|
+
|
309
|
+
|
310
|
+
end
|
311
|
+
|
312
|
+
|
313
|
+
if attributes.has_key?(:'maximumContiguousWorkTimeMinutes')
|
314
|
+
|
315
|
+
|
316
|
+
self.maximum_contiguous_work_time_minutes = attributes[:'maximumContiguousWorkTimeMinutes']
|
317
|
+
|
318
|
+
|
319
|
+
end
|
320
|
+
|
321
|
+
|
322
|
+
if attributes.has_key?(:'activities')
|
323
|
+
|
324
|
+
if (value = attributes[:'activities']).is_a?(Array)
|
325
|
+
self.activities = value
|
326
|
+
end
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
end
|
331
|
+
|
332
|
+
|
333
|
+
if attributes.has_key?(:'id')
|
334
|
+
|
335
|
+
|
336
|
+
self.id = attributes[:'id']
|
337
|
+
|
338
|
+
|
339
|
+
end
|
340
|
+
|
341
|
+
|
342
|
+
if attributes.has_key?(:'delete')
|
343
|
+
|
344
|
+
|
345
|
+
self.delete = attributes[:'delete']
|
346
|
+
|
347
|
+
|
348
|
+
end
|
349
|
+
|
350
|
+
|
351
|
+
end
|
352
|
+
|
353
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
354
|
+
# @return Array for valid properies with the reasons
|
355
|
+
def list_invalid_properties
|
356
|
+
invalid_properties = Array.new
|
357
|
+
|
358
|
+
|
359
|
+
return invalid_properties
|
360
|
+
end
|
361
|
+
|
362
|
+
# Check to see if the all the properties in the model are valid
|
363
|
+
# @return true if the model is valid
|
364
|
+
def valid?
|
365
|
+
|
366
|
+
|
367
|
+
if @name.nil?
|
368
|
+
return false
|
369
|
+
end
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
end
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
# Checks equality by comparing each attribute.
|
546
|
+
# @param [Object] Object to be compared
|
547
|
+
def ==(o)
|
548
|
+
return true if self.equal?(o)
|
549
|
+
self.class == o.class &&
|
550
|
+
name == o.name &&
|
551
|
+
days == o.days &&
|
552
|
+
flexible_start_time == o.flexible_start_time &&
|
553
|
+
exact_start_time_minutes_from_midnight == o.exact_start_time_minutes_from_midnight &&
|
554
|
+
earliest_start_time_minutes_from_midnight == o.earliest_start_time_minutes_from_midnight &&
|
555
|
+
latest_start_time_minutes_from_midnight == o.latest_start_time_minutes_from_midnight &&
|
556
|
+
constrain_stop_time == o.constrain_stop_time &&
|
557
|
+
latest_stop_time_minutes_from_midnight == o.latest_stop_time_minutes_from_midnight &&
|
558
|
+
start_increment_minutes == o.start_increment_minutes &&
|
559
|
+
flexible_paid_time == o.flexible_paid_time &&
|
560
|
+
exact_paid_time_minutes == o.exact_paid_time_minutes &&
|
561
|
+
minimum_paid_time_minutes == o.minimum_paid_time_minutes &&
|
562
|
+
maximum_paid_time_minutes == o.maximum_paid_time_minutes &&
|
563
|
+
constrain_contiguous_work_time == o.constrain_contiguous_work_time &&
|
564
|
+
minimum_contiguous_work_time_minutes == o.minimum_contiguous_work_time_minutes &&
|
565
|
+
maximum_contiguous_work_time_minutes == o.maximum_contiguous_work_time_minutes &&
|
566
|
+
activities == o.activities &&
|
567
|
+
id == o.id &&
|
568
|
+
delete == o.delete
|
569
|
+
end
|
570
|
+
|
571
|
+
# @see the `==` method
|
572
|
+
# @param [Object] Object to be compared
|
573
|
+
def eql?(o)
|
574
|
+
self == o
|
575
|
+
end
|
576
|
+
|
577
|
+
# Calculates hash code according to all attributes.
|
578
|
+
# @return [Fixnum] Hash code
|
579
|
+
def hash
|
580
|
+
[name, days, flexible_start_time, exact_start_time_minutes_from_midnight, earliest_start_time_minutes_from_midnight, latest_start_time_minutes_from_midnight, constrain_stop_time, latest_stop_time_minutes_from_midnight, start_increment_minutes, flexible_paid_time, exact_paid_time_minutes, minimum_paid_time_minutes, maximum_paid_time_minutes, constrain_contiguous_work_time, minimum_contiguous_work_time_minutes, maximum_contiguous_work_time_minutes, activities, id, delete].hash
|
581
|
+
end
|
582
|
+
|
583
|
+
# build the object from hash
|
584
|
+
def build_from_hash(attributes)
|
585
|
+
return nil unless attributes.is_a?(Hash)
|
586
|
+
self.class.swagger_types.each_pair do |key, type|
|
587
|
+
if type =~ /^Array<(.*)>/i
|
588
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
589
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
590
|
+
else
|
591
|
+
#TODO show warning in debug mode
|
592
|
+
end
|
593
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
594
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
595
|
+
else
|
596
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
597
|
+
end
|
598
|
+
end
|
599
|
+
|
600
|
+
self
|
601
|
+
end
|
602
|
+
|
603
|
+
def _deserialize(type, value)
|
604
|
+
case type.to_sym
|
605
|
+
when :DateTime
|
606
|
+
DateTime.parse(value)
|
607
|
+
when :Date
|
608
|
+
Date.parse(value)
|
609
|
+
when :String
|
610
|
+
value.to_s
|
611
|
+
when :Integer
|
612
|
+
value.to_i
|
613
|
+
when :Float
|
614
|
+
value.to_f
|
615
|
+
when :BOOLEAN
|
616
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
617
|
+
true
|
618
|
+
else
|
619
|
+
false
|
620
|
+
end
|
621
|
+
when :Object
|
622
|
+
# generic object (usually a Hash), return directly
|
623
|
+
value
|
624
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
625
|
+
inner_type = Regexp.last_match[:inner_type]
|
626
|
+
value.map { |v| _deserialize(inner_type, v) }
|
627
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
628
|
+
k_type = Regexp.last_match[:k_type]
|
629
|
+
v_type = Regexp.last_match[:v_type]
|
630
|
+
{}.tap do |hash|
|
631
|
+
value.each do |k, v|
|
632
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
633
|
+
end
|
634
|
+
end
|
635
|
+
else # model
|
636
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
637
|
+
_model.build_from_hash(value)
|
638
|
+
end
|
639
|
+
end
|
640
|
+
|
641
|
+
def to_s
|
642
|
+
to_hash.to_s
|
643
|
+
end
|
644
|
+
|
645
|
+
# to_body is an alias to to_body (backward compatibility))
|
646
|
+
def to_body
|
647
|
+
to_hash
|
648
|
+
end
|
649
|
+
|
650
|
+
# return the object in the form of hash
|
651
|
+
def to_hash
|
652
|
+
hash = {}
|
653
|
+
self.class.attribute_map.each_pair do |attr, param|
|
654
|
+
value = self.send(attr)
|
655
|
+
next if value.nil?
|
656
|
+
hash[param] = _to_hash(value)
|
657
|
+
end
|
658
|
+
hash
|
659
|
+
end
|
660
|
+
|
661
|
+
# Method to output non-array value in the form of hash
|
662
|
+
# For object, use to_hash. Otherwise, just return the value
|
663
|
+
def _to_hash(value)
|
664
|
+
if value.is_a?(Array)
|
665
|
+
value.compact.map{ |v| _to_hash(v) }
|
666
|
+
elsif value.is_a?(Hash)
|
667
|
+
{}.tap do |hash|
|
668
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
669
|
+
end
|
670
|
+
elsif value.respond_to? :to_hash
|
671
|
+
value.to_hash
|
672
|
+
else
|
673
|
+
value
|
674
|
+
end
|
675
|
+
end
|
676
|
+
|
677
|
+
end
|
678
|
+
end
|