purecloudplatformclientv2 87.0.0 → 92.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/AmazonLexRequest.md +14 -0
- data/docs/AnalyticsEvaluation.md +1 -1
- data/docs/ApiUsageQuery.md +16 -0
- data/docs/ApiUsageQueryResult.md +14 -0
- data/docs/ApiUsageRow.md +25 -0
- data/docs/ArchitectApi.md +132 -0
- data/docs/AuditApi.md +130 -0
- data/docs/AuditQueryEntity.md +14 -0
- data/docs/AuditQueryExecutionStatusResponse.md +1 -0
- data/docs/AuditQueryRequest.md +1 -0
- data/docs/AuditQueryService.md +14 -0
- data/docs/AuditQueryServiceMapping.md +13 -0
- data/docs/AuditQuerySort.md +14 -0
- data/docs/AuditRealtimeQueryRequest.md +18 -0
- data/docs/AuditRealtimeQueryResultsResponse.md +17 -0
- data/docs/BuAgentScheduleActivity.md +2 -0
- data/docs/BuRescheduleRequest.md +2 -2
- data/docs/ButtonComponent.md +16 -0
- data/docs/CoachingApi.md +1 -1
- data/docs/ContentActions.md +17 -0
- data/docs/ContentAttachment.md +19 -0
- data/docs/ContentGeneric.md +19 -0
- data/docs/ContentList.md +19 -0
- data/docs/ContentLocation.md +17 -0
- data/docs/ContentNotificationTemplate.md +17 -0
- data/docs/ContentQuickReply.md +16 -0
- data/docs/ConversationAggregationQuery.md +1 -1
- data/docs/CreateQueueRequest.md +1 -0
- data/docs/EdgeGroup.md +1 -0
- data/docs/EntityListing.md +1 -5
- data/docs/EvaluationAggregationQuery.md +1 -1
- data/docs/ExternalContact.md +2 -0
- data/docs/ExternalOrganization.md +2 -0
- data/docs/FlowAggregationQuery.md +1 -1
- data/docs/FlowExecutionLaunchRequest.md +16 -0
- data/docs/FlowExecutionLaunchResponse.md +16 -0
- data/docs/FlowRuntimeExecution.md +23 -0
- data/docs/GenericSAML.md +22 -0
- data/docs/GoogleDialogflowCustomSettings.md +13 -0
- data/docs/GroupsApi.md +4 -4
- data/docs/IdentityProviderApi.md +187 -0
- data/docs/IpAddressAuthentication.md +13 -0
- data/docs/KnowledgeSearchResponse.md +1 -1
- data/docs/LanguageUnderstandingApi.md +164 -30
- data/docs/ListItemComponent.md +19 -0
- data/docs/MessageContent.md +19 -0
- data/docs/NluDomainVersion.md +3 -1
- data/docs/NotificationTemplateBody.md +14 -0
- data/docs/NotificationTemplateFooter.md +13 -0
- data/docs/NotificationTemplateHeader.md +16 -0
- data/docs/NotificationTemplateParameter.md +14 -0
- data/docs/OAuthApi.md +208 -0
- data/docs/OrganizationApi.md +126 -0
- data/docs/PostTextMessage.md +15 -0
- data/docs/PostTextRequest.md +23 -0
- data/docs/PostTextResponse.md +20 -0
- data/docs/Prompt.md +2 -2
- data/docs/Queue.md +1 -0
- data/docs/QueueRequest.md +1 -0
- data/docs/RecordingApi.md +12 -0
- data/docs/ReportingDataExportTopicDataExportNotification.md +1 -0
- data/docs/ScimEmail.md +1 -1
- data/docs/SurveyAggregationQuery.md +1 -1
- data/docs/SurveyForm.md +0 -2
- data/docs/TextbotsApi.md +78 -0
- data/docs/UploadUrlRequest.md +1 -0
- data/docs/UsageApi.md +144 -0
- data/docs/UsageExecutionResult.md +14 -0
- data/docs/UserAggregationQuery.md +1 -1
- data/docs/UserQueue.md +1 -0
- data/docs/UsersApi.md +5 -5
- data/docs/ViewFilter.md +2 -0
- data/docs/VoicemailMessagesTopicOwner.md +13 -0
- data/docs/VoicemailMessagesTopicVoicemailCopyRecord.md +14 -0
- data/docs/VoicemailMessagesTopicVoicemailMessage.md +2 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuForecastModification.md +23 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecast.md +24 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecastNotification.md +15 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicForecastSourceDayPointer.md +17 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicModificationIntervalOffsetValue.md +14 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicUserReference.md +13 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicWfmVersionedEntityMetadata.md +15 -0
- data/docs/WorkforceManagementApi.md +3 -3
- data/lib/purecloudplatformclientv2.rb +45 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +130 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +129 -0
- data/lib/purecloudplatformclientv2/api/groups_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/identity_provider_api.rb +175 -0
- data/lib/purecloudplatformclientv2/api/language_understanding_api.rb +189 -30
- data/lib/purecloudplatformclientv2/api/o_auth_api.rb +224 -0
- data/lib/purecloudplatformclientv2/api/organization_api.rb +120 -0
- data/lib/purecloudplatformclientv2/api/recording_api.rb +78 -0
- data/lib/purecloudplatformclientv2/api/textbots_api.rb +92 -0
- data/lib/purecloudplatformclientv2/api/usage_api.rb +157 -0
- data/lib/purecloudplatformclientv2/api/users_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/amazon_lex_request.rb +232 -0
- data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
- data/lib/purecloudplatformclientv2/models/api_usage_query.rb +303 -0
- data/lib/purecloudplatformclientv2/models/api_usage_query_result.rb +244 -0
- data/lib/purecloudplatformclientv2/models/api_usage_row.rb +514 -0
- data/lib/purecloudplatformclientv2/models/audit_log_message.rb +6 -6
- data/lib/purecloudplatformclientv2/models/audit_query_entity.rb +244 -0
- data/lib/purecloudplatformclientv2/models/audit_query_execution_status_response.rb +34 -6
- data/lib/purecloudplatformclientv2/models/audit_query_request.rb +34 -6
- data/lib/purecloudplatformclientv2/models/audit_query_service.rb +244 -0
- data/lib/purecloudplatformclientv2/models/audit_query_service_mapping.rb +204 -0
- data/lib/purecloudplatformclientv2/models/audit_query_sort.rb +266 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +360 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_results_response.rb +303 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +70 -4
- data/lib/purecloudplatformclientv2/models/bu_reschedule_request.rb +2 -12
- data/lib/purecloudplatformclientv2/models/button_component.rb +281 -0
- data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/coaching_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/models/content_actions.rb +309 -0
- data/lib/purecloudplatformclientv2/models/content_attachment.rb +378 -0
- data/lib/purecloudplatformclientv2/models/content_generic.rb +361 -0
- data/lib/purecloudplatformclientv2/models/content_list.rb +375 -0
- data/lib/purecloudplatformclientv2/models/content_location.rb +307 -0
- data/lib/purecloudplatformclientv2/models/content_notification_template.rb +312 -0
- data/lib/purecloudplatformclientv2/models/content_quick_reply.rb +300 -0
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_queue_request.rb +29 -1
- data/lib/purecloudplatformclientv2/models/edge_group.rb +27 -1
- data/lib/purecloudplatformclientv2/models/entity_listing.rb +4 -104
- data/lib/purecloudplatformclientv2/models/evaluation_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/external_contact.rb +55 -1
- data/lib/purecloudplatformclientv2/models/external_organization.rb +55 -1
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/flow_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/flow_execution_launch_request.rb +288 -0
- data/lib/purecloudplatformclientv2/models/flow_execution_launch_response.rb +281 -0
- data/lib/purecloudplatformclientv2/models/flow_runtime_execution.rb +494 -0
- data/lib/purecloudplatformclientv2/models/generic_saml.rb +428 -0
- data/lib/purecloudplatformclientv2/models/google_dialogflow_custom_settings.rb +202 -0
- data/lib/purecloudplatformclientv2/models/ip_address_authentication.rb +203 -0
- data/lib/purecloudplatformclientv2/models/knowledge_search_response.rb +18 -18
- data/lib/purecloudplatformclientv2/models/list_item_component.rb +373 -0
- data/lib/purecloudplatformclientv2/models/message_content.rb +378 -0
- data/lib/purecloudplatformclientv2/models/nlu_domain_version.rb +72 -1
- data/lib/purecloudplatformclientv2/models/notification_template_body.rb +236 -0
- data/lib/purecloudplatformclientv2/models/notification_template_footer.rb +203 -0
- data/lib/purecloudplatformclientv2/models/notification_template_header.rb +302 -0
- data/lib/purecloudplatformclientv2/models/notification_template_parameter.rb +234 -0
- data/lib/purecloudplatformclientv2/models/post_text_message.rb +275 -0
- data/lib/purecloudplatformclientv2/models/post_text_request.rb +482 -0
- data/lib/purecloudplatformclientv2/models/post_text_response.rb +413 -0
- data/lib/purecloudplatformclientv2/models/prompt.rb +2 -0
- data/lib/purecloudplatformclientv2/models/prompt_asset.rb +15 -1
- data/lib/purecloudplatformclientv2/models/prompt_asset_create.rb +15 -1
- data/lib/purecloudplatformclientv2/models/queue.rb +29 -1
- data/lib/purecloudplatformclientv2/models/queue_request.rb +29 -1
- data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +31 -4
- data/lib/purecloudplatformclientv2/models/scim_email.rb +1 -1
- data/lib/purecloudplatformclientv2/models/survey_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/survey_form.rb +1 -53
- data/lib/purecloudplatformclientv2/models/upload_url_request.rb +43 -4
- data/lib/purecloudplatformclientv2/models/usage_execution_result.rb +228 -0
- data/lib/purecloudplatformclientv2/models/user_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/user_queue.rb +29 -1
- data/lib/purecloudplatformclientv2/models/view_filter.rb +58 -4
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_owner.rb +201 -0
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_copy_record.rb +226 -0
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_message.rb +56 -4
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_forecast_modification.rb +497 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast.rb +494 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast_notification.rb +265 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_forecast_source_day_pointer.rb +315 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_modification_interval_offset_value.rb +226 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_user_reference.rb +201 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_wfm_versioned_entity_metadata.rb +251 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +92 -2
@@ -0,0 +1,494 @@
|
|
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: UNLICENSED
|
11
|
+
https://help.mypurecloud.com/articles/terms-and-conditions/
|
12
|
+
|
13
|
+
Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class WfmBuShortTermForecastImportCompleteTopicBuShortTermForecast
|
21
|
+
attr_accessor :id
|
22
|
+
|
23
|
+
attr_accessor :week_date
|
24
|
+
|
25
|
+
attr_accessor :creation_method
|
26
|
+
|
27
|
+
attr_accessor :description
|
28
|
+
|
29
|
+
attr_accessor :legacy
|
30
|
+
|
31
|
+
attr_accessor :reference_start_date
|
32
|
+
|
33
|
+
attr_accessor :source_days
|
34
|
+
|
35
|
+
attr_accessor :modifications
|
36
|
+
|
37
|
+
attr_accessor :time_zone
|
38
|
+
|
39
|
+
attr_accessor :planning_groups_version
|
40
|
+
|
41
|
+
attr_accessor :week_count
|
42
|
+
|
43
|
+
attr_accessor :metadata
|
44
|
+
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
46
|
+
def self.attribute_map
|
47
|
+
{
|
48
|
+
|
49
|
+
:'id' => :'id',
|
50
|
+
|
51
|
+
:'week_date' => :'weekDate',
|
52
|
+
|
53
|
+
:'creation_method' => :'creationMethod',
|
54
|
+
|
55
|
+
:'description' => :'description',
|
56
|
+
|
57
|
+
:'legacy' => :'legacy',
|
58
|
+
|
59
|
+
:'reference_start_date' => :'referenceStartDate',
|
60
|
+
|
61
|
+
:'source_days' => :'sourceDays',
|
62
|
+
|
63
|
+
:'modifications' => :'modifications',
|
64
|
+
|
65
|
+
:'time_zone' => :'timeZone',
|
66
|
+
|
67
|
+
:'planning_groups_version' => :'planningGroupsVersion',
|
68
|
+
|
69
|
+
:'week_count' => :'weekCount',
|
70
|
+
|
71
|
+
:'metadata' => :'metadata'
|
72
|
+
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
# Attribute type mapping.
|
77
|
+
def self.swagger_types
|
78
|
+
{
|
79
|
+
|
80
|
+
:'id' => :'String',
|
81
|
+
|
82
|
+
:'week_date' => :'String',
|
83
|
+
|
84
|
+
:'creation_method' => :'String',
|
85
|
+
|
86
|
+
:'description' => :'String',
|
87
|
+
|
88
|
+
:'legacy' => :'BOOLEAN',
|
89
|
+
|
90
|
+
:'reference_start_date' => :'DateTime',
|
91
|
+
|
92
|
+
:'source_days' => :'Array<WfmBuShortTermForecastImportCompleteTopicForecastSourceDayPointer>',
|
93
|
+
|
94
|
+
:'modifications' => :'Array<WfmBuShortTermForecastImportCompleteTopicBuForecastModification>',
|
95
|
+
|
96
|
+
:'time_zone' => :'String',
|
97
|
+
|
98
|
+
:'planning_groups_version' => :'Integer',
|
99
|
+
|
100
|
+
:'week_count' => :'Integer',
|
101
|
+
|
102
|
+
:'metadata' => :'WfmBuShortTermForecastImportCompleteTopicWfmVersionedEntityMetadata'
|
103
|
+
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# Initializes the object
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
def initialize(attributes = {})
|
110
|
+
return unless attributes.is_a?(Hash)
|
111
|
+
|
112
|
+
# convert string to symbol for hash key
|
113
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
114
|
+
|
115
|
+
|
116
|
+
if attributes.has_key?(:'id')
|
117
|
+
|
118
|
+
|
119
|
+
self.id = attributes[:'id']
|
120
|
+
|
121
|
+
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
if attributes.has_key?(:'weekDate')
|
126
|
+
|
127
|
+
|
128
|
+
self.week_date = attributes[:'weekDate']
|
129
|
+
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
|
134
|
+
if attributes.has_key?(:'creationMethod')
|
135
|
+
|
136
|
+
|
137
|
+
self.creation_method = attributes[:'creationMethod']
|
138
|
+
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
|
143
|
+
if attributes.has_key?(:'description')
|
144
|
+
|
145
|
+
|
146
|
+
self.description = attributes[:'description']
|
147
|
+
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
|
152
|
+
if attributes.has_key?(:'legacy')
|
153
|
+
|
154
|
+
|
155
|
+
self.legacy = attributes[:'legacy']
|
156
|
+
|
157
|
+
|
158
|
+
end
|
159
|
+
|
160
|
+
|
161
|
+
if attributes.has_key?(:'referenceStartDate')
|
162
|
+
|
163
|
+
|
164
|
+
self.reference_start_date = attributes[:'referenceStartDate']
|
165
|
+
|
166
|
+
|
167
|
+
end
|
168
|
+
|
169
|
+
|
170
|
+
if attributes.has_key?(:'sourceDays')
|
171
|
+
|
172
|
+
if (value = attributes[:'sourceDays']).is_a?(Array)
|
173
|
+
self.source_days = value
|
174
|
+
end
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
end
|
179
|
+
|
180
|
+
|
181
|
+
if attributes.has_key?(:'modifications')
|
182
|
+
|
183
|
+
if (value = attributes[:'modifications']).is_a?(Array)
|
184
|
+
self.modifications = value
|
185
|
+
end
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
end
|
190
|
+
|
191
|
+
|
192
|
+
if attributes.has_key?(:'timeZone')
|
193
|
+
|
194
|
+
|
195
|
+
self.time_zone = attributes[:'timeZone']
|
196
|
+
|
197
|
+
|
198
|
+
end
|
199
|
+
|
200
|
+
|
201
|
+
if attributes.has_key?(:'planningGroupsVersion')
|
202
|
+
|
203
|
+
|
204
|
+
self.planning_groups_version = attributes[:'planningGroupsVersion']
|
205
|
+
|
206
|
+
|
207
|
+
end
|
208
|
+
|
209
|
+
|
210
|
+
if attributes.has_key?(:'weekCount')
|
211
|
+
|
212
|
+
|
213
|
+
self.week_count = attributes[:'weekCount']
|
214
|
+
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
|
219
|
+
if attributes.has_key?(:'metadata')
|
220
|
+
|
221
|
+
|
222
|
+
self.metadata = attributes[:'metadata']
|
223
|
+
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
231
|
+
# @return Array for valid properies with the reasons
|
232
|
+
def list_invalid_properties
|
233
|
+
invalid_properties = Array.new
|
234
|
+
|
235
|
+
|
236
|
+
return invalid_properties
|
237
|
+
end
|
238
|
+
|
239
|
+
# Check to see if the all the properties in the model are valid
|
240
|
+
# @return true if the model is valid
|
241
|
+
def valid?
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
allowed_values = ["Import", "ImportedHistoricalWeightedAverage", "HistoricalWeightedAverage", "Advanced"]
|
254
|
+
if @creation_method && !allowed_values.include?(@creation_method)
|
255
|
+
return false
|
256
|
+
end
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
end
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
# Custom attribute writer method checking allowed values (enum).
|
311
|
+
# @param [Object] creation_method Object to be assigned
|
312
|
+
def creation_method=(creation_method)
|
313
|
+
allowed_values = ["Import", "ImportedHistoricalWeightedAverage", "HistoricalWeightedAverage", "Advanced"]
|
314
|
+
if creation_method && !allowed_values.include?(creation_method)
|
315
|
+
fail ArgumentError, "invalid value for 'creation_method', must be one of #{allowed_values}."
|
316
|
+
end
|
317
|
+
@creation_method = creation_method
|
318
|
+
end
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
# Checks equality by comparing each attribute.
|
369
|
+
# @param [Object] Object to be compared
|
370
|
+
def ==(o)
|
371
|
+
return true if self.equal?(o)
|
372
|
+
self.class == o.class &&
|
373
|
+
id == o.id &&
|
374
|
+
week_date == o.week_date &&
|
375
|
+
creation_method == o.creation_method &&
|
376
|
+
description == o.description &&
|
377
|
+
legacy == o.legacy &&
|
378
|
+
reference_start_date == o.reference_start_date &&
|
379
|
+
source_days == o.source_days &&
|
380
|
+
modifications == o.modifications &&
|
381
|
+
time_zone == o.time_zone &&
|
382
|
+
planning_groups_version == o.planning_groups_version &&
|
383
|
+
week_count == o.week_count &&
|
384
|
+
metadata == o.metadata
|
385
|
+
end
|
386
|
+
|
387
|
+
# @see the `==` method
|
388
|
+
# @param [Object] Object to be compared
|
389
|
+
def eql?(o)
|
390
|
+
self == o
|
391
|
+
end
|
392
|
+
|
393
|
+
# Calculates hash code according to all attributes.
|
394
|
+
# @return [Fixnum] Hash code
|
395
|
+
def hash
|
396
|
+
[id, week_date, creation_method, description, legacy, reference_start_date, source_days, modifications, time_zone, planning_groups_version, week_count, metadata].hash
|
397
|
+
end
|
398
|
+
|
399
|
+
# build the object from hash
|
400
|
+
def build_from_hash(attributes)
|
401
|
+
return nil unless attributes.is_a?(Hash)
|
402
|
+
self.class.swagger_types.each_pair do |key, type|
|
403
|
+
if type =~ /^Array<(.*)>/i
|
404
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
405
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
406
|
+
else
|
407
|
+
#TODO show warning in debug mode
|
408
|
+
end
|
409
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
410
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
411
|
+
else
|
412
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
self
|
417
|
+
end
|
418
|
+
|
419
|
+
def _deserialize(type, value)
|
420
|
+
case type.to_sym
|
421
|
+
when :DateTime
|
422
|
+
DateTime.parse(value)
|
423
|
+
when :Date
|
424
|
+
Date.parse(value)
|
425
|
+
when :String
|
426
|
+
value.to_s
|
427
|
+
when :Integer
|
428
|
+
value.to_i
|
429
|
+
when :Float
|
430
|
+
value.to_f
|
431
|
+
when :BOOLEAN
|
432
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
433
|
+
true
|
434
|
+
else
|
435
|
+
false
|
436
|
+
end
|
437
|
+
when :Object
|
438
|
+
# generic object (usually a Hash), return directly
|
439
|
+
value
|
440
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
441
|
+
inner_type = Regexp.last_match[:inner_type]
|
442
|
+
value.map { |v| _deserialize(inner_type, v) }
|
443
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
444
|
+
k_type = Regexp.last_match[:k_type]
|
445
|
+
v_type = Regexp.last_match[:v_type]
|
446
|
+
{}.tap do |hash|
|
447
|
+
value.each do |k, v|
|
448
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
449
|
+
end
|
450
|
+
end
|
451
|
+
else # model
|
452
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
453
|
+
_model.build_from_hash(value)
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
def to_s
|
458
|
+
to_hash.to_s
|
459
|
+
end
|
460
|
+
|
461
|
+
# to_body is an alias to to_body (backward compatibility))
|
462
|
+
def to_body
|
463
|
+
to_hash
|
464
|
+
end
|
465
|
+
|
466
|
+
# return the object in the form of hash
|
467
|
+
def to_hash
|
468
|
+
hash = {}
|
469
|
+
self.class.attribute_map.each_pair do |attr, param|
|
470
|
+
value = self.send(attr)
|
471
|
+
next if value.nil?
|
472
|
+
hash[param] = _to_hash(value)
|
473
|
+
end
|
474
|
+
hash
|
475
|
+
end
|
476
|
+
|
477
|
+
# Method to output non-array value in the form of hash
|
478
|
+
# For object, use to_hash. Otherwise, just return the value
|
479
|
+
def _to_hash(value)
|
480
|
+
if value.is_a?(Array)
|
481
|
+
value.compact.map{ |v| _to_hash(v) }
|
482
|
+
elsif value.is_a?(Hash)
|
483
|
+
{}.tap do |hash|
|
484
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
485
|
+
end
|
486
|
+
elsif value.respond_to? :to_hash
|
487
|
+
value.to_hash
|
488
|
+
else
|
489
|
+
value
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
end
|
494
|
+
end
|