purecloudplatformclientv2 75.1.0 → 79.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.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/ActivityCode.md +1 -1
  4. data/docs/AnalyticsApi.md +66 -2
  5. data/docs/AnalyticsConversationAsyncQueryResponse.md +1 -1
  6. data/docs/AnalyticsConversationQueryResponse.md +1 -1
  7. data/docs/AnalyticsParticipant.md +1 -0
  8. data/docs/AnalyticsParticipantWithoutAttributes.md +1 -0
  9. data/docs/ArchitectApi.md +345 -0
  10. data/docs/AuditApi.md +3 -1
  11. data/docs/AuditLogMessage.md +1 -1
  12. data/docs/AuthorizationApi.md +154 -9
  13. data/docs/AvailableTopic.md +3 -1
  14. data/docs/BuAgentScheduleActivity.md +18 -0
  15. data/docs/BuAgentSchedulePublishedScheduleReference.md +16 -0
  16. data/docs/BuAgentScheduleSearchResponse.md +15 -0
  17. data/docs/BuAgentScheduleShift.md +18 -0
  18. data/docs/BuAgentSchedulesSearchResponse.md +15 -0
  19. data/docs/BuAsyncAgentSchedulesSearchResponse.md +17 -0
  20. data/docs/BuFullDayTimeOffMarker.md +18 -0
  21. data/docs/BuScheduleReference.md +15 -0
  22. data/docs/Call.md +1 -1
  23. data/docs/CallBasic.md +1 -1
  24. data/docs/CallMediaParticipant.md +1 -1
  25. data/docs/CallbackMediaParticipant.md +1 -1
  26. data/docs/CampaignProgress.md +2 -1
  27. data/docs/ChatMediaParticipant.md +1 -1
  28. data/docs/CobrowseMediaParticipant.md +1 -1
  29. data/docs/ConversationsApi.md +71 -1
  30. data/docs/CopyAttachmentsRequest.md +14 -0
  31. data/docs/CreateManagementUnitApiRequest.md +3 -2
  32. data/docs/CreateManagementUnitSettingsRequest.md +1 -1
  33. data/docs/CreateWorkPlanShift.md +1 -1
  34. data/docs/DataTableExportJob.md +22 -0
  35. data/docs/DataTableImportJob.md +25 -0
  36. data/docs/DivsPermittedEntityListing.md +23 -0
  37. data/docs/EmailMediaParticipant.md +1 -1
  38. data/docs/EntityListing.md +17 -0
  39. data/docs/ErrorBody.md +2 -2
  40. data/docs/ErrorInfo.md +14 -0
  41. data/docs/Evaluation.md +1 -0
  42. data/docs/EvaluationQuestionGroupScore.md +4 -0
  43. data/docs/EvaluationScoringSet.md +1 -0
  44. data/docs/FacebookIntegrationRequest.md +2 -2
  45. data/docs/GDPRJourneyCustomer.md +2 -2
  46. data/docs/InboundDomain.md +2 -0
  47. data/docs/Library.md +4 -3
  48. data/docs/LicenseApi.md +66 -0
  49. data/docs/MailFromResult.md +15 -0
  50. data/docs/ManagementUnit.md +2 -2
  51. data/docs/ManagementUnitSettingsRequest.md +1 -1
  52. data/docs/MessageMediaParticipant.md +1 -1
  53. data/docs/MessagingApi.md +0 -936
  54. data/docs/MessagingTemplate.md +15 -0
  55. data/docs/Organization.md +1 -0
  56. data/docs/QualityApi.md +5 -6
  57. data/docs/Record.md +15 -0
  58. data/docs/ReportingExportMetadataJobListing.md +22 -0
  59. data/docs/ReportingExportMetadataJobResponse.md +22 -0
  60. data/docs/Response.md +2 -0
  61. data/docs/RoutingApi.md +385 -0
  62. data/docs/RoutingSettings.md +13 -0
  63. data/docs/SCIMApi.md +397 -23
  64. data/docs/ScimUserExtensions.md +14 -0
  65. data/docs/ScimUserRole.md +13 -0
  66. data/docs/ScimUserRoutingLanguage.md +14 -0
  67. data/docs/ScimUserRoutingSkill.md +14 -0
  68. data/docs/ScimV2CreateUser.md +2 -1
  69. data/docs/ScimV2SchemaAttribute.md +24 -0
  70. data/docs/ScimV2SchemaDefinition.md +17 -0
  71. data/docs/ScimV2SchemaListResponse.md +17 -0
  72. data/docs/ScimV2User.md +2 -1
  73. data/docs/ShortTermForecast.md +2 -2
  74. data/docs/ShortTermForecastListItemResponse.md +2 -2
  75. data/docs/ShortTermForecastReference.md +2 -2
  76. data/docs/TimeOffRequestLookup.md +3 -3
  77. data/docs/TimeOffRequestResponse.md +3 -3
  78. data/docs/UserScheduleAdherence.md +1 -1
  79. data/docs/UsersApi.md +358 -10
  80. data/docs/ViewFilter.md +4 -10
  81. data/docs/WeekSchedule.md +1 -1
  82. data/docs/WeekScheduleListItemResponse.md +1 -1
  83. data/docs/WeekScheduleReference.md +1 -1
  84. data/docs/WorkPlanShift.md +1 -1
  85. data/docs/WorkforceManagementApi.md +40 -41
  86. data/lib/purecloudplatformclientv2.rb +27 -0
  87. data/lib/purecloudplatformclientv2/api/analytics_api.rb +73 -0
  88. data/lib/purecloudplatformclientv2/api/architect_api.rb +373 -0
  89. data/lib/purecloudplatformclientv2/api/audit_api.rb +9 -0
  90. data/lib/purecloudplatformclientv2/api/authorization_api.rb +185 -7
  91. data/lib/purecloudplatformclientv2/api/conversations_api.rb +84 -0
  92. data/lib/purecloudplatformclientv2/api/license_api.rb +63 -0
  93. data/lib/purecloudplatformclientv2/api/messaging_api.rb +0 -949
  94. data/lib/purecloudplatformclientv2/api/quality_api.rb +8 -6
  95. data/lib/purecloudplatformclientv2/api/routing_api.rb +378 -0
  96. data/lib/purecloudplatformclientv2/api/scim_api.rb +366 -26
  97. data/lib/purecloudplatformclientv2/api/users_api.rb +398 -7
  98. data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +3 -3
  99. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  100. data/lib/purecloudplatformclientv2/models/activity_code.rb +30 -30
  101. data/lib/purecloudplatformclientv2/models/analytics_conversation_async_query_response.rb +15 -15
  102. data/lib/purecloudplatformclientv2/models/analytics_conversation_query_response.rb +15 -15
  103. data/lib/purecloudplatformclientv2/models/analytics_participant.rb +27 -1
  104. data/lib/purecloudplatformclientv2/models/analytics_participant_without_attributes.rb +27 -1
  105. data/lib/purecloudplatformclientv2/models/audit_log_message.rb +5 -5
  106. data/lib/purecloudplatformclientv2/models/available_topic.rb +57 -4
  107. data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +332 -0
  108. data/lib/purecloudplatformclientv2/models/bu_agent_schedule_published_schedule_reference.rb +280 -0
  109. data/lib/purecloudplatformclientv2/models/bu_agent_schedule_search_response.rb +258 -0
  110. data/lib/purecloudplatformclientv2/models/bu_agent_schedule_shift.rb +334 -0
  111. data/lib/purecloudplatformclientv2/models/bu_agent_schedules_search_response.rb +258 -0
  112. data/lib/purecloudplatformclientv2/models/bu_async_agent_schedules_search_response.rb +320 -0
  113. data/lib/purecloudplatformclientv2/models/bu_full_day_time_off_marker.rb +332 -0
  114. data/lib/purecloudplatformclientv2/models/bu_schedule_reference.rb +254 -0
  115. data/lib/purecloudplatformclientv2/models/call.rb +1 -1
  116. data/lib/purecloudplatformclientv2/models/call_basic.rb +1 -1
  117. data/lib/purecloudplatformclientv2/models/call_media_participant.rb +1 -1
  118. data/lib/purecloudplatformclientv2/models/callback_media_participant.rb +1 -1
  119. data/lib/purecloudplatformclientv2/models/campaign_progress.rb +28 -2
  120. data/lib/purecloudplatformclientv2/models/chat_media_participant.rb +1 -1
  121. data/lib/purecloudplatformclientv2/models/cobrowse_media_participant.rb +1 -1
  122. data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
  123. data/lib/purecloudplatformclientv2/models/copy_attachments_request.rb +240 -0
  124. data/lib/purecloudplatformclientv2/models/create_management_unit_api_request.rb +37 -16
  125. data/lib/purecloudplatformclientv2/models/create_management_unit_settings_request.rb +1 -1
  126. data/lib/purecloudplatformclientv2/models/create_work_plan_shift.rb +1 -1
  127. data/lib/purecloudplatformclientv2/models/data_table_export_job.rb +455 -0
  128. data/lib/purecloudplatformclientv2/models/data_table_import_job.rb +547 -0
  129. data/lib/purecloudplatformclientv2/models/divs_permitted_entity_listing.rb +453 -0
  130. data/lib/purecloudplatformclientv2/models/email_media_participant.rb +1 -1
  131. data/lib/purecloudplatformclientv2/models/entity_listing.rb +303 -0
  132. data/lib/purecloudplatformclientv2/models/error_body.rb +20 -20
  133. data/lib/purecloudplatformclientv2/models/error_info.rb +226 -0
  134. data/lib/purecloudplatformclientv2/models/evaluation.rb +27 -1
  135. data/lib/purecloudplatformclientv2/models/evaluation_question_group_score.rb +101 -1
  136. data/lib/purecloudplatformclientv2/models/evaluation_scoring_set.rb +26 -1
  137. data/lib/purecloudplatformclientv2/models/facebook_integration_request.rb +2 -7
  138. data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
  139. data/lib/purecloudplatformclientv2/models/gdpr_journey_customer.rb +2 -12
  140. data/lib/purecloudplatformclientv2/models/inbound_domain.rb +53 -1
  141. data/lib/purecloudplatformclientv2/models/library.rb +44 -2
  142. data/lib/purecloudplatformclientv2/models/mail_from_result.rb +275 -0
  143. data/lib/purecloudplatformclientv2/models/management_unit.rb +2 -2
  144. data/lib/purecloudplatformclientv2/models/management_unit_settings_request.rb +1 -1
  145. data/lib/purecloudplatformclientv2/models/message_media_participant.rb +1 -1
  146. data/lib/purecloudplatformclientv2/models/messaging_template.rb +270 -0
  147. data/lib/purecloudplatformclientv2/models/organization.rb +41 -1
  148. data/lib/purecloudplatformclientv2/models/record.rb +269 -0
  149. data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +2 -2
  150. data/lib/purecloudplatformclientv2/models/reporting_export_metadata_job_listing.rb +428 -0
  151. data/lib/purecloudplatformclientv2/models/reporting_export_metadata_job_response.rb +459 -0
  152. data/lib/purecloudplatformclientv2/models/response.rb +67 -1
  153. data/lib/purecloudplatformclientv2/models/routing_settings.rb +202 -0
  154. data/lib/purecloudplatformclientv2/models/scim_metadata.rb +2 -2
  155. data/lib/purecloudplatformclientv2/models/scim_user_extensions.rb +233 -0
  156. data/lib/purecloudplatformclientv2/models/scim_user_role.rb +203 -0
  157. data/lib/purecloudplatformclientv2/models/scim_user_routing_language.rb +234 -0
  158. data/lib/purecloudplatformclientv2/models/scim_user_routing_skill.rb +234 -0
  159. data/lib/purecloudplatformclientv2/models/scim_v2_create_user.rb +30 -5
  160. data/lib/purecloudplatformclientv2/models/scim_v2_group_reference.rb +2 -2
  161. data/lib/purecloudplatformclientv2/models/scim_v2_member_reference.rb +2 -2
  162. data/lib/purecloudplatformclientv2/models/scim_v2_schema_attribute.rb +551 -0
  163. data/lib/purecloudplatformclientv2/models/scim_v2_schema_definition.rb +309 -0
  164. data/lib/purecloudplatformclientv2/models/scim_v2_schema_list_response.rb +311 -0
  165. data/lib/purecloudplatformclientv2/models/scim_v2_user.rb +27 -2
  166. data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
  167. data/lib/purecloudplatformclientv2/models/short_term_forecast.rb +30 -35
  168. data/lib/purecloudplatformclientv2/models/short_term_forecast_list_item_response.rb +30 -35
  169. data/lib/purecloudplatformclientv2/models/short_term_forecast_reference.rb +22 -27
  170. data/lib/purecloudplatformclientv2/models/time_off_request_lookup.rb +3 -3
  171. data/lib/purecloudplatformclientv2/models/time_off_request_response.rb +3 -3
  172. data/lib/purecloudplatformclientv2/models/user_schedule_adherence.rb +1 -1
  173. data/lib/purecloudplatformclientv2/models/view_filter.rb +53 -255
  174. data/lib/purecloudplatformclientv2/models/week_schedule.rb +21 -21
  175. data/lib/purecloudplatformclientv2/models/week_schedule_list_item_response.rb +21 -21
  176. data/lib/purecloudplatformclientv2/models/week_schedule_reference.rb +14 -14
  177. data/lib/purecloudplatformclientv2/models/work_plan_shift.rb +1 -1
  178. data/lib/purecloudplatformclientv2/version.rb +1 -1
  179. metadata +56 -2
@@ -0,0 +1,547 @@
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
+ # State information for an import job of rows to a datatable
21
+ class DataTableImportJob
22
+ # The globally unique identifier for the object.
23
+ attr_accessor :id
24
+
25
+ attr_accessor :name
26
+
27
+ # The PureCloud user who started the import job
28
+ attr_accessor :owner
29
+
30
+ # The status of the import job
31
+ attr_accessor :status
32
+
33
+ # The timestamp of when the import began. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
34
+ attr_accessor :date_created
35
+
36
+ # The timestamp of when the import stopped (either successfully or unsuccessfully). Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
37
+ attr_accessor :date_completed
38
+
39
+ # The URL of the location at which the caller can upload the file to be imported
40
+ attr_accessor :upload_uri
41
+
42
+ # The indication of whether the processing should remove rows that don't appear in the import file
43
+ attr_accessor :import_mode
44
+
45
+ # Any error information, or null of the processing is not in an error state
46
+ attr_accessor :error_information
47
+
48
+ # The current count of the number of records processed
49
+ attr_accessor :count_records_updated
50
+
51
+ # The current count of the number of records deleted
52
+ attr_accessor :count_records_deleted
53
+
54
+ # The current count of the number of records that failed to import
55
+ attr_accessor :count_records_failed
56
+
57
+ # The URI for this object
58
+ attr_accessor :self_uri
59
+
60
+ # Attribute mapping from ruby-style variable name to JSON key.
61
+ def self.attribute_map
62
+ {
63
+
64
+ :'id' => :'id',
65
+
66
+ :'name' => :'name',
67
+
68
+ :'owner' => :'owner',
69
+
70
+ :'status' => :'status',
71
+
72
+ :'date_created' => :'dateCreated',
73
+
74
+ :'date_completed' => :'dateCompleted',
75
+
76
+ :'upload_uri' => :'uploadURI',
77
+
78
+ :'import_mode' => :'importMode',
79
+
80
+ :'error_information' => :'errorInformation',
81
+
82
+ :'count_records_updated' => :'countRecordsUpdated',
83
+
84
+ :'count_records_deleted' => :'countRecordsDeleted',
85
+
86
+ :'count_records_failed' => :'countRecordsFailed',
87
+
88
+ :'self_uri' => :'selfUri'
89
+
90
+ }
91
+ end
92
+
93
+ # Attribute type mapping.
94
+ def self.swagger_types
95
+ {
96
+
97
+ :'id' => :'String',
98
+
99
+ :'name' => :'String',
100
+
101
+ :'owner' => :'AddressableEntityRef',
102
+
103
+ :'status' => :'String',
104
+
105
+ :'date_created' => :'DateTime',
106
+
107
+ :'date_completed' => :'DateTime',
108
+
109
+ :'upload_uri' => :'String',
110
+
111
+ :'import_mode' => :'String',
112
+
113
+ :'error_information' => :'ErrorBody',
114
+
115
+ :'count_records_updated' => :'Integer',
116
+
117
+ :'count_records_deleted' => :'Integer',
118
+
119
+ :'count_records_failed' => :'Integer',
120
+
121
+ :'self_uri' => :'String'
122
+
123
+ }
124
+ end
125
+
126
+ # Initializes the object
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ def initialize(attributes = {})
129
+ return unless attributes.is_a?(Hash)
130
+
131
+ # convert string to symbol for hash key
132
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
133
+
134
+
135
+ if attributes.has_key?(:'id')
136
+
137
+
138
+ self.id = attributes[:'id']
139
+
140
+
141
+ end
142
+
143
+
144
+ if attributes.has_key?(:'name')
145
+
146
+
147
+ self.name = attributes[:'name']
148
+
149
+
150
+ end
151
+
152
+
153
+ if attributes.has_key?(:'owner')
154
+
155
+
156
+ self.owner = attributes[:'owner']
157
+
158
+
159
+ end
160
+
161
+
162
+ if attributes.has_key?(:'status')
163
+
164
+
165
+ self.status = attributes[:'status']
166
+
167
+
168
+ end
169
+
170
+
171
+ if attributes.has_key?(:'dateCreated')
172
+
173
+
174
+ self.date_created = attributes[:'dateCreated']
175
+
176
+
177
+ end
178
+
179
+
180
+ if attributes.has_key?(:'dateCompleted')
181
+
182
+
183
+ self.date_completed = attributes[:'dateCompleted']
184
+
185
+
186
+ end
187
+
188
+
189
+ if attributes.has_key?(:'uploadURI')
190
+
191
+
192
+ self.upload_uri = attributes[:'uploadURI']
193
+
194
+
195
+ end
196
+
197
+
198
+ if attributes.has_key?(:'importMode')
199
+
200
+
201
+ self.import_mode = attributes[:'importMode']
202
+
203
+
204
+ end
205
+
206
+
207
+ if attributes.has_key?(:'errorInformation')
208
+
209
+
210
+ self.error_information = attributes[:'errorInformation']
211
+
212
+
213
+ end
214
+
215
+
216
+ if attributes.has_key?(:'countRecordsUpdated')
217
+
218
+
219
+ self.count_records_updated = attributes[:'countRecordsUpdated']
220
+
221
+
222
+ end
223
+
224
+
225
+ if attributes.has_key?(:'countRecordsDeleted')
226
+
227
+
228
+ self.count_records_deleted = attributes[:'countRecordsDeleted']
229
+
230
+
231
+ end
232
+
233
+
234
+ if attributes.has_key?(:'countRecordsFailed')
235
+
236
+
237
+ self.count_records_failed = attributes[:'countRecordsFailed']
238
+
239
+
240
+ end
241
+
242
+
243
+ if attributes.has_key?(:'selfUri')
244
+
245
+
246
+ self.self_uri = attributes[:'selfUri']
247
+
248
+
249
+ end
250
+
251
+
252
+ end
253
+
254
+ # Show invalid properties with the reasons. Usually used together with valid?
255
+ # @return Array for valid properies with the reasons
256
+ def list_invalid_properties
257
+ invalid_properties = Array.new
258
+
259
+
260
+ return invalid_properties
261
+ end
262
+
263
+ # Check to see if the all the properties in the model are valid
264
+ # @return true if the model is valid
265
+ def valid?
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+ if @status.nil?
281
+ return false
282
+ end
283
+
284
+
285
+
286
+ allowed_values = ["WaitingForUpload", "Processing", "Failed", "Succeeded"]
287
+ if @status && !allowed_values.include?(@status)
288
+ return false
289
+ end
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+ allowed_values = ["ReplaceAll", "Append"]
308
+ if @import_mode && !allowed_values.include?(@import_mode)
309
+ return false
310
+ end
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+ end
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+ # Custom attribute writer method checking allowed values (enum).
354
+ # @param [Object] status Object to be assigned
355
+ def status=(status)
356
+ allowed_values = ["WaitingForUpload", "Processing", "Failed", "Succeeded"]
357
+ if status && !allowed_values.include?(status)
358
+ fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
359
+ end
360
+ @status = status
361
+ end
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+ # Custom attribute writer method checking allowed values (enum).
383
+ # @param [Object] import_mode Object to be assigned
384
+ def import_mode=(import_mode)
385
+ allowed_values = ["ReplaceAll", "Append"]
386
+ if import_mode && !allowed_values.include?(import_mode)
387
+ fail ArgumentError, "invalid value for 'import_mode', must be one of #{allowed_values}."
388
+ end
389
+ @import_mode = import_mode
390
+ end
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
+ # Checks equality by comparing each attribute.
421
+ # @param [Object] Object to be compared
422
+ def ==(o)
423
+ return true if self.equal?(o)
424
+ self.class == o.class &&
425
+ id == o.id &&
426
+ name == o.name &&
427
+ owner == o.owner &&
428
+ status == o.status &&
429
+ date_created == o.date_created &&
430
+ date_completed == o.date_completed &&
431
+ upload_uri == o.upload_uri &&
432
+ import_mode == o.import_mode &&
433
+ error_information == o.error_information &&
434
+ count_records_updated == o.count_records_updated &&
435
+ count_records_deleted == o.count_records_deleted &&
436
+ count_records_failed == o.count_records_failed &&
437
+ self_uri == o.self_uri
438
+ end
439
+
440
+ # @see the `==` method
441
+ # @param [Object] Object to be compared
442
+ def eql?(o)
443
+ self == o
444
+ end
445
+
446
+ # Calculates hash code according to all attributes.
447
+ # @return [Fixnum] Hash code
448
+ def hash
449
+ [id, name, owner, status, date_created, date_completed, upload_uri, import_mode, error_information, count_records_updated, count_records_deleted, count_records_failed, self_uri].hash
450
+ end
451
+
452
+ # build the object from hash
453
+ def build_from_hash(attributes)
454
+ return nil unless attributes.is_a?(Hash)
455
+ self.class.swagger_types.each_pair do |key, type|
456
+ if type =~ /^Array<(.*)>/i
457
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
458
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
459
+ else
460
+ #TODO show warning in debug mode
461
+ end
462
+ elsif !attributes[self.class.attribute_map[key]].nil?
463
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
464
+ else
465
+ # data not found in attributes(hash), not an issue as the data can be optional
466
+ end
467
+ end
468
+
469
+ self
470
+ end
471
+
472
+ def _deserialize(type, value)
473
+ case type.to_sym
474
+ when :DateTime
475
+ DateTime.parse(value)
476
+ when :Date
477
+ Date.parse(value)
478
+ when :String
479
+ value.to_s
480
+ when :Integer
481
+ value.to_i
482
+ when :Float
483
+ value.to_f
484
+ when :BOOLEAN
485
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
486
+ true
487
+ else
488
+ false
489
+ end
490
+ when :Object
491
+ # generic object (usually a Hash), return directly
492
+ value
493
+ when /\AArray<(?<inner_type>.+)>\z/
494
+ inner_type = Regexp.last_match[:inner_type]
495
+ value.map { |v| _deserialize(inner_type, v) }
496
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
497
+ k_type = Regexp.last_match[:k_type]
498
+ v_type = Regexp.last_match[:v_type]
499
+ {}.tap do |hash|
500
+ value.each do |k, v|
501
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
502
+ end
503
+ end
504
+ else # model
505
+ _model = Object.const_get("PureCloud").const_get(type).new
506
+ _model.build_from_hash(value)
507
+ end
508
+ end
509
+
510
+ def to_s
511
+ to_hash.to_s
512
+ end
513
+
514
+ # to_body is an alias to to_body (backward compatibility))
515
+ def to_body
516
+ to_hash
517
+ end
518
+
519
+ # return the object in the form of hash
520
+ def to_hash
521
+ hash = {}
522
+ self.class.attribute_map.each_pair do |attr, param|
523
+ value = self.send(attr)
524
+ next if value.nil?
525
+ hash[param] = _to_hash(value)
526
+ end
527
+ hash
528
+ end
529
+
530
+ # Method to output non-array value in the form of hash
531
+ # For object, use to_hash. Otherwise, just return the value
532
+ def _to_hash(value)
533
+ if value.is_a?(Array)
534
+ value.compact.map{ |v| _to_hash(v) }
535
+ elsif value.is_a?(Hash)
536
+ {}.tap do |hash|
537
+ value.each { |k, v| hash[k] = _to_hash(v) }
538
+ end
539
+ elsif value.respond_to? :to_hash
540
+ value.to_hash
541
+ else
542
+ value
543
+ end
544
+ end
545
+
546
+ end
547
+ end