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
@@ -58,6 +58,8 @@ module PureCloud
58
58
  # The URI of the schema for the enterprise user.
59
59
  attr_accessor :urnietfparamsscimschemasextensionenterprise2_0_user
60
60
 
61
+ attr_accessor :urnietfparamsscimschemasextensiongenesyspurecloud2_0_user
62
+
61
63
  # Attribute mapping from ruby-style variable name to JSON key.
62
64
  def self.attribute_map
63
65
  {
@@ -86,7 +88,9 @@ module PureCloud
86
88
 
87
89
  :'roles' => :'roles',
88
90
 
89
- :'urnietfparamsscimschemasextensionenterprise2_0_user' => :'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User'
91
+ :'urnietfparamsscimschemasextensionenterprise2_0_user' => :'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User',
92
+
93
+ :'urnietfparamsscimschemasextensiongenesyspurecloud2_0_user' => :'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User'
90
94
 
91
95
  }
92
96
  end
@@ -117,9 +121,11 @@ module PureCloud
117
121
 
118
122
  :'groups' => :'Array<ScimV2GroupReference>',
119
123
 
120
- :'roles' => :'Array<String>',
124
+ :'roles' => :'Array<ScimUserRole>',
125
+
126
+ :'urnietfparamsscimschemasextensionenterprise2_0_user' => :'ScimV2EnterpriseUser',
121
127
 
122
- :'urnietfparamsscimschemasextensionenterprise2_0_user' => :'ScimV2EnterpriseUser'
128
+ :'urnietfparamsscimschemasextensiongenesyspurecloud2_0_user' => :'ScimUserExtensions'
123
129
 
124
130
  }
125
131
  end
@@ -262,6 +268,15 @@ module PureCloud
262
268
  end
263
269
 
264
270
 
271
+ if attributes.has_key?(:'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User')
272
+
273
+
274
+ self.urnietfparamsscimschemasextensiongenesyspurecloud2_0_user = attributes[:'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User']
275
+
276
+
277
+ end
278
+
279
+
265
280
  end
266
281
 
267
282
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -334,6 +349,10 @@ module PureCloud
334
349
 
335
350
 
336
351
 
352
+
353
+
354
+
355
+
337
356
 
338
357
 
339
358
 
@@ -401,6 +420,11 @@ module PureCloud
401
420
 
402
421
 
403
422
 
423
+
424
+
425
+
426
+
427
+
404
428
 
405
429
 
406
430
 
@@ -424,7 +448,8 @@ module PureCloud
424
448
  external_id == o.external_id &&
425
449
  groups == o.groups &&
426
450
  roles == o.roles &&
427
- urnietfparamsscimschemasextensionenterprise2_0_user == o.urnietfparamsscimschemasextensionenterprise2_0_user
451
+ urnietfparamsscimschemasextensionenterprise2_0_user == o.urnietfparamsscimschemasextensionenterprise2_0_user &&
452
+ urnietfparamsscimschemasextensiongenesyspurecloud2_0_user == o.urnietfparamsscimschemasextensiongenesyspurecloud2_0_user
428
453
  end
429
454
 
430
455
  # @see the `==` method
@@ -436,7 +461,7 @@ module PureCloud
436
461
  # Calculates hash code according to all attributes.
437
462
  # @return [Fixnum] Hash code
438
463
  def hash
439
- [schemas, active, user_name, display_name, password, title, phone_numbers, emails, photos, external_id, groups, roles, urnietfparamsscimschemasextensionenterprise2_0_user].hash
464
+ [schemas, active, user_name, display_name, password, title, phone_numbers, emails, photos, external_id, groups, roles, urnietfparamsscimschemasextensionenterprise2_0_user, urnietfparamsscimschemasextensiongenesyspurecloud2_0_user].hash
440
465
  end
441
466
 
442
467
  # build the object from hash
@@ -107,7 +107,7 @@ module PureCloud
107
107
 
108
108
 
109
109
 
110
- allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
110
+ allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
111
111
  if @type && !allowed_values.include?(@type)
112
112
  return false
113
113
  end
@@ -129,7 +129,7 @@ module PureCloud
129
129
  # Custom attribute writer method checking allowed values (enum).
130
130
  # @param [Object] type Object to be assigned
131
131
  def type=(type)
132
- allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
132
+ allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
133
133
  if type && !allowed_values.include?(type)
134
134
  fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
135
135
  end
@@ -107,7 +107,7 @@ module PureCloud
107
107
 
108
108
 
109
109
 
110
- allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
110
+ allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
111
111
  if @type && !allowed_values.include?(@type)
112
112
  return false
113
113
  end
@@ -129,7 +129,7 @@ module PureCloud
129
129
  # Custom attribute writer method checking allowed values (enum).
130
130
  # @param [Object] type Object to be assigned
131
131
  def type=(type)
132
- allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType"]
132
+ allowed_values = ["User", "Group", "ServiceProviderConfig", "ResourceType", "Schema"]
133
133
  if type && !allowed_values.include?(type)
134
134
  fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
135
135
  end
@@ -0,0 +1,551 @@
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
+ # A complex type that defines service provider attributes, or sub-attributes and their qualities.
21
+ class ScimV2SchemaAttribute
22
+ # The attribute's name
23
+ attr_accessor :name
24
+
25
+ # The attribute's data type. Valid values are \"string\", \"boolean\", \"decimal\", \"integer\", \"dateTime\", \"reference\", and \"complex\".
26
+ attr_accessor :type
27
+
28
+ # When an attribute is of type \"complex\", \"subAttributes\" defines a set of sub-attributes. \"subAttributes\" has the same schema sub-attributes as \"attributes\"
29
+ attr_accessor :sub_attributes
30
+
31
+ # A Boolean value indicating the attribute's plurality.
32
+ attr_accessor :multi_valued
33
+
34
+ # The attribute's human-readable description.
35
+ attr_accessor :description
36
+
37
+ # A Boolean value that specifies whether or not the attribute is required.
38
+ attr_accessor :required
39
+
40
+ # A collection of suggested canonical values that MAY be used (e.g., \"work\" and \"home\"). In some cases, service providers MAY choose to ignore unsupported values. OPTIONAL.
41
+ attr_accessor :canonical_values
42
+
43
+ # A Boolean value that specifies whether or not a string attribute is case sensitive. The server SHALL use case sensitivity when evaluating filters. For attributes that are case exact, the server SHALL preserve case for any value submitted. If the attribute is case insensitive, the server MAY alter case for a submitted value. Case sensitivity also impacts how attribute values MAY be compared against filter values (see Section 3.4.2.2 of [RFC7644])
44
+ attr_accessor :case_exact
45
+
46
+ # A single keyword indicating the circumstances under which the value of the attribute can be (re)defined. Value are readOnly, readWrite, immutable, writeOnly
47
+ attr_accessor :mutability
48
+
49
+ # A single keyword that indicates when an attribute and associated values are returned in response to a GET request, or in response to a PUT, POST, or PATCH request. Valid keywords are as follows: always, never, default, request
50
+ attr_accessor :returned
51
+
52
+ # A single keyword value that specifies how the service provider enforces uniqueness of attribute values. A server MAY reject an invalid value based on uniqueness by returning HTTP response code 400 (Bad Request). A client MAY enforce uniqueness on the client side to a greater degree than the service provider enforces. For example, a client could make a value unique while the server has uniqueness of \"none\". Valid keywords are as follows: none, server, global
53
+ attr_accessor :uniqueness
54
+
55
+ # A multi-valued array of JSON strings that indicate the SCIM resource types that may be referenced. Values include User, Group, external and uri.
56
+ attr_accessor :reference_types
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+
62
+ :'name' => :'name',
63
+
64
+ :'type' => :'type',
65
+
66
+ :'sub_attributes' => :'subAttributes',
67
+
68
+ :'multi_valued' => :'multiValued',
69
+
70
+ :'description' => :'description',
71
+
72
+ :'required' => :'required',
73
+
74
+ :'canonical_values' => :'canonicalValues',
75
+
76
+ :'case_exact' => :'caseExact',
77
+
78
+ :'mutability' => :'mutability',
79
+
80
+ :'returned' => :'returned',
81
+
82
+ :'uniqueness' => :'uniqueness',
83
+
84
+ :'reference_types' => :'referenceTypes'
85
+
86
+ }
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.swagger_types
91
+ {
92
+
93
+ :'name' => :'String',
94
+
95
+ :'type' => :'String',
96
+
97
+ :'sub_attributes' => :'Array<ScimV2SchemaAttribute>',
98
+
99
+ :'multi_valued' => :'BOOLEAN',
100
+
101
+ :'description' => :'String',
102
+
103
+ :'required' => :'BOOLEAN',
104
+
105
+ :'canonical_values' => :'Array<String>',
106
+
107
+ :'case_exact' => :'BOOLEAN',
108
+
109
+ :'mutability' => :'String',
110
+
111
+ :'returned' => :'String',
112
+
113
+ :'uniqueness' => :'String',
114
+
115
+ :'reference_types' => :'Array<String>'
116
+
117
+ }
118
+ end
119
+
120
+ # Initializes the object
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ def initialize(attributes = {})
123
+ return unless attributes.is_a?(Hash)
124
+
125
+ # convert string to symbol for hash key
126
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
127
+
128
+
129
+ if attributes.has_key?(:'name')
130
+
131
+
132
+ self.name = attributes[:'name']
133
+
134
+
135
+ end
136
+
137
+
138
+ if attributes.has_key?(:'type')
139
+
140
+
141
+ self.type = attributes[:'type']
142
+
143
+
144
+ end
145
+
146
+
147
+ if attributes.has_key?(:'subAttributes')
148
+
149
+ if (value = attributes[:'subAttributes']).is_a?(Array)
150
+ self.sub_attributes = value
151
+ end
152
+
153
+
154
+
155
+ end
156
+
157
+
158
+ if attributes.has_key?(:'multiValued')
159
+
160
+
161
+ self.multi_valued = attributes[:'multiValued']
162
+
163
+
164
+ end
165
+
166
+
167
+ if attributes.has_key?(:'description')
168
+
169
+
170
+ self.description = attributes[:'description']
171
+
172
+
173
+ end
174
+
175
+
176
+ if attributes.has_key?(:'required')
177
+
178
+
179
+ self.required = attributes[:'required']
180
+
181
+
182
+ end
183
+
184
+
185
+ if attributes.has_key?(:'canonicalValues')
186
+
187
+ if (value = attributes[:'canonicalValues']).is_a?(Array)
188
+ self.canonical_values = value
189
+ end
190
+
191
+
192
+
193
+ end
194
+
195
+
196
+ if attributes.has_key?(:'caseExact')
197
+
198
+
199
+ self.case_exact = attributes[:'caseExact']
200
+
201
+
202
+ end
203
+
204
+
205
+ if attributes.has_key?(:'mutability')
206
+
207
+
208
+ self.mutability = attributes[:'mutability']
209
+
210
+
211
+ end
212
+
213
+
214
+ if attributes.has_key?(:'returned')
215
+
216
+
217
+ self.returned = attributes[:'returned']
218
+
219
+
220
+ end
221
+
222
+
223
+ if attributes.has_key?(:'uniqueness')
224
+
225
+
226
+ self.uniqueness = attributes[:'uniqueness']
227
+
228
+
229
+ end
230
+
231
+
232
+ if attributes.has_key?(:'referenceTypes')
233
+
234
+ if (value = attributes[:'referenceTypes']).is_a?(Array)
235
+ self.reference_types = value
236
+ end
237
+
238
+
239
+
240
+ end
241
+
242
+
243
+ end
244
+
245
+ # Show invalid properties with the reasons. Usually used together with valid?
246
+ # @return Array for valid properies with the reasons
247
+ def list_invalid_properties
248
+ invalid_properties = Array.new
249
+
250
+
251
+ return invalid_properties
252
+ end
253
+
254
+ # Check to see if the all the properties in the model are valid
255
+ # @return true if the model is valid
256
+ def valid?
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+ allowed_values = ["STRING", "BOOLEAN", "DECIMAL", "INTEGER", "DATE_TIME", "REFERENCE", "COMPLEX"]
265
+ if @type && !allowed_values.include?(@type)
266
+ return false
267
+ end
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
+
297
+ allowed_values = ["readWrite", "readOnly", "immutable", "writeOnly"]
298
+ if @mutability && !allowed_values.include?(@mutability)
299
+ return false
300
+ end
301
+
302
+
303
+
304
+
305
+
306
+ allowed_values = ["ALWAYS", "NEVER", "DEFAULT", "REQUEST"]
307
+ if @returned && !allowed_values.include?(@returned)
308
+ return false
309
+ end
310
+
311
+
312
+
313
+
314
+
315
+ allowed_values = ["NONE", "SERVER", "GLOBAL"]
316
+ if @uniqueness && !allowed_values.include?(@uniqueness)
317
+ return false
318
+ end
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ end
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+ # Custom attribute writer method checking allowed values (enum).
336
+ # @param [Object] type Object to be assigned
337
+ def type=(type)
338
+ allowed_values = ["STRING", "BOOLEAN", "DECIMAL", "INTEGER", "DATE_TIME", "REFERENCE", "COMPLEX"]
339
+ if type && !allowed_values.include?(type)
340
+ fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
341
+ end
342
+ @type = type
343
+ end
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
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+ # Custom attribute writer method checking allowed values (enum).
380
+ # @param [Object] mutability Object to be assigned
381
+ def mutability=(mutability)
382
+ allowed_values = ["readWrite", "readOnly", "immutable", "writeOnly"]
383
+ if mutability && !allowed_values.include?(mutability)
384
+ fail ArgumentError, "invalid value for 'mutability', must be one of #{allowed_values}."
385
+ end
386
+ @mutability = mutability
387
+ end
388
+
389
+
390
+
391
+
392
+
393
+ # Custom attribute writer method checking allowed values (enum).
394
+ # @param [Object] returned Object to be assigned
395
+ def returned=(returned)
396
+ allowed_values = ["ALWAYS", "NEVER", "DEFAULT", "REQUEST"]
397
+ if returned && !allowed_values.include?(returned)
398
+ fail ArgumentError, "invalid value for 'returned', must be one of #{allowed_values}."
399
+ end
400
+ @returned = returned
401
+ end
402
+
403
+
404
+
405
+
406
+
407
+ # Custom attribute writer method checking allowed values (enum).
408
+ # @param [Object] uniqueness Object to be assigned
409
+ def uniqueness=(uniqueness)
410
+ allowed_values = ["NONE", "SERVER", "GLOBAL"]
411
+ if uniqueness && !allowed_values.include?(uniqueness)
412
+ fail ArgumentError, "invalid value for 'uniqueness', must be one of #{allowed_values}."
413
+ end
414
+ @uniqueness = uniqueness
415
+ end
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+ # Checks equality by comparing each attribute.
426
+ # @param [Object] Object to be compared
427
+ def ==(o)
428
+ return true if self.equal?(o)
429
+ self.class == o.class &&
430
+ name == o.name &&
431
+ type == o.type &&
432
+ sub_attributes == o.sub_attributes &&
433
+ multi_valued == o.multi_valued &&
434
+ description == o.description &&
435
+ required == o.required &&
436
+ canonical_values == o.canonical_values &&
437
+ case_exact == o.case_exact &&
438
+ mutability == o.mutability &&
439
+ returned == o.returned &&
440
+ uniqueness == o.uniqueness &&
441
+ reference_types == o.reference_types
442
+ end
443
+
444
+ # @see the `==` method
445
+ # @param [Object] Object to be compared
446
+ def eql?(o)
447
+ self == o
448
+ end
449
+
450
+ # Calculates hash code according to all attributes.
451
+ # @return [Fixnum] Hash code
452
+ def hash
453
+ [name, type, sub_attributes, multi_valued, description, required, canonical_values, case_exact, mutability, returned, uniqueness, reference_types].hash
454
+ end
455
+
456
+ # build the object from hash
457
+ def build_from_hash(attributes)
458
+ return nil unless attributes.is_a?(Hash)
459
+ self.class.swagger_types.each_pair do |key, type|
460
+ if type =~ /^Array<(.*)>/i
461
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
462
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
463
+ else
464
+ #TODO show warning in debug mode
465
+ end
466
+ elsif !attributes[self.class.attribute_map[key]].nil?
467
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
468
+ else
469
+ # data not found in attributes(hash), not an issue as the data can be optional
470
+ end
471
+ end
472
+
473
+ self
474
+ end
475
+
476
+ def _deserialize(type, value)
477
+ case type.to_sym
478
+ when :DateTime
479
+ DateTime.parse(value)
480
+ when :Date
481
+ Date.parse(value)
482
+ when :String
483
+ value.to_s
484
+ when :Integer
485
+ value.to_i
486
+ when :Float
487
+ value.to_f
488
+ when :BOOLEAN
489
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
490
+ true
491
+ else
492
+ false
493
+ end
494
+ when :Object
495
+ # generic object (usually a Hash), return directly
496
+ value
497
+ when /\AArray<(?<inner_type>.+)>\z/
498
+ inner_type = Regexp.last_match[:inner_type]
499
+ value.map { |v| _deserialize(inner_type, v) }
500
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
501
+ k_type = Regexp.last_match[:k_type]
502
+ v_type = Regexp.last_match[:v_type]
503
+ {}.tap do |hash|
504
+ value.each do |k, v|
505
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
506
+ end
507
+ end
508
+ else # model
509
+ _model = Object.const_get("PureCloud").const_get(type).new
510
+ _model.build_from_hash(value)
511
+ end
512
+ end
513
+
514
+ def to_s
515
+ to_hash.to_s
516
+ end
517
+
518
+ # to_body is an alias to to_body (backward compatibility))
519
+ def to_body
520
+ to_hash
521
+ end
522
+
523
+ # return the object in the form of hash
524
+ def to_hash
525
+ hash = {}
526
+ self.class.attribute_map.each_pair do |attr, param|
527
+ value = self.send(attr)
528
+ next if value.nil?
529
+ hash[param] = _to_hash(value)
530
+ end
531
+ hash
532
+ end
533
+
534
+ # Method to output non-array value in the form of hash
535
+ # For object, use to_hash. Otherwise, just return the value
536
+ def _to_hash(value)
537
+ if value.is_a?(Array)
538
+ value.compact.map{ |v| _to_hash(v) }
539
+ elsif value.is_a?(Hash)
540
+ {}.tap do |hash|
541
+ value.each { |k, v| hash[k] = _to_hash(v) }
542
+ end
543
+ elsif value.respond_to? :to_hash
544
+ value.to_hash
545
+ else
546
+ value
547
+ end
548
+ end
549
+
550
+ end
551
+ end