purecloudplatformclientv2 22.0.0 → 23.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/ActivityCode.md +8 -5
  4. data/docs/ActivityCodeContainer.md +1 -0
  5. data/docs/AdherenceSettings.md +1 -1
  6. data/docs/ArchitectApi.md +14 -14
  7. data/docs/AuthorizationApi.md +3 -1
  8. data/docs/BatchDownloadJobResult.md +20 -0
  9. data/docs/BatchDownloadJobStatusResult.md +20 -0
  10. data/docs/BatchDownloadJobSubmission.md +13 -0
  11. data/docs/BatchDownloadJobSubmissionResult.md +15 -0
  12. data/docs/BatchDownloadRequest.md +14 -0
  13. data/docs/Call.md +2 -0
  14. data/docs/CallBasic.md +2 -0
  15. data/docs/CallForwardingNotification.md +17 -0
  16. data/docs/CallForwardingNotificationCall.md +13 -0
  17. data/docs/CallForwardingNotificationCalls.md +13 -0
  18. data/docs/CallForwardingNotificationTarget.md +14 -0
  19. data/docs/CallForwardingNotificationTargets.md +14 -0
  20. data/docs/CallForwardingNotificationUser.md +13 -0
  21. data/docs/CallRoute.md +0 -1
  22. data/docs/{SignedData.md → ContactColumnTimeZone.md} +2 -3
  23. data/docs/CreateActivityCodeRequest.md +18 -0
  24. data/docs/CreateQueueRequest.md +12 -11
  25. data/docs/ExternalContact.md +1 -0
  26. data/docs/IgnoredActivityCategories.md +13 -0
  27. data/docs/ManagementUnit.md +4 -3
  28. data/docs/ManagementUnitSettings.md +1 -3
  29. data/docs/MessageDetails.md +1 -0
  30. data/docs/MessageMedia.md +14 -0
  31. data/docs/MoveAgentResponse.md +14 -0
  32. data/docs/MoveAgentsRequest.md +14 -0
  33. data/docs/MoveAgentsResponse.md +15 -0
  34. data/docs/NTPSettings.md +13 -0
  35. data/docs/OrganizationAuthorizationApi.md +2 -2
  36. data/docs/OutOfOfficeNotification.md +1 -0
  37. data/docs/OutboundApi.md +63 -0
  38. data/docs/Queue.md +12 -11
  39. data/docs/Recording.md +1 -0
  40. data/docs/RecordingApi.md +120 -0
  41. data/docs/RecordingMessagingMessage.md +18 -0
  42. data/docs/RoutingApi.md +2 -2
  43. data/docs/SchedulingSettings.md +1 -0
  44. data/docs/ShrinkageOverride.md +14 -0
  45. data/docs/ShrinkageOverrides.md +14 -0
  46. data/docs/Site.md +1 -0
  47. data/docs/TrustCreate.md +2 -1
  48. data/docs/TrustGroup.md +26 -0
  49. data/docs/{TrustUserCreate.md → TrustMemberCreate.md} +4 -4
  50. data/docs/TrustRequest.md +2 -1
  51. data/docs/TrustRequestCreate.md +2 -1
  52. data/docs/UserQueue.md +12 -11
  53. data/docs/WfmVersionedEntityMetadata.md +15 -0
  54. data/docs/WorkforceManagementApi.md +128 -3
  55. data/docs/{Entity.md → WrapUpCodeReference.md} +2 -2
  56. data/lib/purecloudplatformclientv2.rb +26 -4
  57. data/lib/purecloudplatformclientv2/api/architect_api.rb +6 -6
  58. data/lib/purecloudplatformclientv2/api/authorization_api.rb +9 -0
  59. data/lib/purecloudplatformclientv2/api/outbound_api.rb +75 -0
  60. data/lib/purecloudplatformclientv2/api/recording_api.rb +130 -0
  61. data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +138 -2
  62. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  63. data/lib/purecloudplatformclientv2/models/activity_code.rb +95 -12
  64. data/lib/purecloudplatformclientv2/models/activity_code_container.rb +35 -4
  65. data/lib/purecloudplatformclientv2/models/adherence_settings.rb +2 -4
  66. data/lib/purecloudplatformclientv2/models/batch_download_job_result.rb +383 -0
  67. data/lib/purecloudplatformclientv2/models/batch_download_job_status_result.rb +385 -0
  68. data/lib/purecloudplatformclientv2/models/batch_download_job_submission.rb +209 -0
  69. data/lib/purecloudplatformclientv2/models/batch_download_job_submission_result.rb +253 -0
  70. data/lib/purecloudplatformclientv2/models/batch_download_request.rb +228 -0
  71. data/lib/purecloudplatformclientv2/models/call.rb +56 -4
  72. data/lib/purecloudplatformclientv2/models/call_basic.rb +56 -4
  73. data/lib/purecloudplatformclientv2/models/call_forwarding_notification.rb +303 -0
  74. data/lib/purecloudplatformclientv2/models/call_forwarding_notification_call.rb +203 -0
  75. data/lib/purecloudplatformclientv2/models/call_forwarding_notification_calls.rb +203 -0
  76. data/lib/purecloudplatformclientv2/models/call_forwarding_notification_target.rb +226 -0
  77. data/lib/purecloudplatformclientv2/models/call_forwarding_notification_targets.rb +226 -0
  78. data/lib/purecloudplatformclientv2/models/{signed_data.rb → call_forwarding_notification_user.rb} +8 -8
  79. data/lib/purecloudplatformclientv2/models/call_route.rb +4 -30
  80. data/lib/purecloudplatformclientv2/models/contact_column_time_zone.rb +176 -0
  81. data/lib/purecloudplatformclientv2/models/create_activity_code_request.rb +358 -0
  82. data/lib/purecloudplatformclientv2/models/create_queue_request.rb +38 -12
  83. data/lib/purecloudplatformclientv2/models/dependency.rb +2 -2
  84. data/lib/purecloudplatformclientv2/models/dependency_object.rb +2 -2
  85. data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
  86. data/lib/purecloudplatformclientv2/models/external_contact.rb +26 -1
  87. data/lib/purecloudplatformclientv2/models/ignored_activity_categories.rb +204 -0
  88. data/lib/purecloudplatformclientv2/models/management_unit.rb +36 -5
  89. data/lib/purecloudplatformclientv2/models/management_unit_settings.rb +9 -61
  90. data/lib/purecloudplatformclientv2/models/message_details.rb +32 -4
  91. data/lib/purecloudplatformclientv2/models/message_media.rb +228 -0
  92. data/lib/purecloudplatformclientv2/models/move_agent_response.rb +243 -0
  93. data/lib/purecloudplatformclientv2/models/move_agents_request.rb +236 -0
  94. data/lib/purecloudplatformclientv2/models/move_agents_response.rb +257 -0
  95. data/lib/purecloudplatformclientv2/models/ntp_settings.rb +204 -0
  96. data/lib/purecloudplatformclientv2/models/out_of_office_notification.rb +26 -1
  97. data/lib/purecloudplatformclientv2/models/prediction_results.rb +2 -2
  98. data/lib/purecloudplatformclientv2/models/queue.rb +38 -12
  99. data/lib/purecloudplatformclientv2/models/recording.rb +29 -1
  100. data/lib/purecloudplatformclientv2/models/recording_messaging_message.rb +327 -0
  101. data/lib/purecloudplatformclientv2/models/scheduling_settings.rb +30 -4
  102. data/lib/purecloudplatformclientv2/models/shrinkage_override.rb +233 -0
  103. data/lib/purecloudplatformclientv2/models/shrinkage_overrides.rb +230 -0
  104. data/lib/purecloudplatformclientv2/models/site.rb +27 -1
  105. data/lib/purecloudplatformclientv2/models/trust_create.rb +32 -9
  106. data/lib/purecloudplatformclientv2/models/trust_group.rb +603 -0
  107. data/lib/purecloudplatformclientv2/models/{trust_user_create.rb → trust_member_create.rb} +3 -3
  108. data/lib/purecloudplatformclientv2/models/trust_request.rb +28 -5
  109. data/lib/purecloudplatformclientv2/models/trust_request_create.rb +32 -9
  110. data/lib/purecloudplatformclientv2/models/user_queue.rb +38 -12
  111. data/lib/purecloudplatformclientv2/models/wfm_versioned_entity_metadata.rb +260 -0
  112. data/lib/purecloudplatformclientv2/models/{entity.rb → wrap_up_code_reference.rb} +1 -1
  113. data/lib/purecloudplatformclientv2/version.rb +1 -1
  114. metadata +54 -10
  115. data/docs/SignedDataApi.md +0 -73
  116. data/lib/purecloudplatformclientv2/api/signed_data_api.rb +0 -90
@@ -0,0 +1,230 @@
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 ShrinkageOverrides
21
+ # Set true to clear the shrinkage interval overrides
22
+ attr_accessor :clear
23
+
24
+ # List of interval shrinkage overrides
25
+ attr_accessor :values
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+
31
+ :'clear' => :'clear',
32
+
33
+ :'values' => :'values'
34
+
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+
42
+ :'clear' => :'BOOLEAN',
43
+
44
+ :'values' => :'Array<ShrinkageOverride>'
45
+
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+
57
+
58
+ if attributes.has_key?(:'clear')
59
+
60
+
61
+ self.clear = attributes[:'clear']
62
+
63
+
64
+ end
65
+
66
+
67
+ if attributes.has_key?(:'values')
68
+
69
+ if (value = attributes[:'values']).is_a?(Array)
70
+ self.values = value
71
+ end
72
+
73
+
74
+
75
+ end
76
+
77
+
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properies with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+
85
+
86
+ return invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ end
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ clear == o.clear &&
120
+ values == o.values
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Fixnum] Hash code
131
+ def hash
132
+ [clear, values].hash
133
+ end
134
+
135
+ # build the object from hash
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.swagger_types.each_pair do |key, type|
139
+ if type =~ /^Array<(.*)>/i
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
142
+ else
143
+ #TODO show warning in debug mode
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ else
148
+ # data not found in attributes(hash), not an issue as the data can be optional
149
+ end
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ def _deserialize(type, value)
156
+ case type.to_sym
157
+ when :DateTime
158
+ DateTime.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :BOOLEAN
168
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ _model = Object.const_get("PureCloud").const_get(type).new
189
+ _model.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_body (backward compatibility))
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # return the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ next if value.nil?
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Method to output non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map{ |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+
229
+ end
230
+ end
@@ -71,6 +71,9 @@ module PureCloud
71
71
 
72
72
  attr_accessor :managed
73
73
 
74
+ # Network Time Protocol settings for the site
75
+ attr_accessor :ntp_settings
76
+
74
77
  # The URI for this object
75
78
  attr_accessor :self_uri
76
79
 
@@ -118,6 +121,8 @@ module PureCloud
118
121
 
119
122
  :'managed' => :'managed',
120
123
 
124
+ :'ntp_settings' => :'ntpSettings',
125
+
121
126
  :'self_uri' => :'selfUri'
122
127
 
123
128
  }
@@ -167,6 +172,8 @@ module PureCloud
167
172
 
168
173
  :'managed' => :'BOOLEAN',
169
174
 
175
+ :'ntp_settings' => :'NTPSettings',
176
+
170
177
  :'self_uri' => :'String'
171
178
 
172
179
  }
@@ -373,6 +380,15 @@ module PureCloud
373
380
  end
374
381
 
375
382
 
383
+ if attributes.has_key?(:'ntpSettings')
384
+
385
+
386
+ self.ntp_settings = attributes[:'ntpSettings']
387
+
388
+
389
+ end
390
+
391
+
376
392
  if attributes.has_key?(:'selfUri')
377
393
 
378
394
 
@@ -496,6 +512,10 @@ module PureCloud
496
512
 
497
513
 
498
514
 
515
+
516
+
517
+
518
+
499
519
  end
500
520
 
501
521
 
@@ -607,6 +627,11 @@ module PureCloud
607
627
 
608
628
 
609
629
 
630
+
631
+
632
+
633
+
634
+
610
635
 
611
636
 
612
637
 
@@ -638,6 +663,7 @@ module PureCloud
638
663
  edge_auto_update_config == o.edge_auto_update_config &&
639
664
  location == o.location &&
640
665
  managed == o.managed &&
666
+ ntp_settings == o.ntp_settings &&
641
667
  self_uri == o.self_uri
642
668
  end
643
669
 
@@ -650,7 +676,7 @@ module PureCloud
650
676
  # Calculates hash code according to all attributes.
651
677
  # @return [Fixnum] Hash code
652
678
  def hash
653
- [id, name, description, version, date_created, date_modified, modified_by, created_by, state, modified_by_app, created_by_app, primary_sites, secondary_sites, primary_edges, secondary_edges, addresses, edges, edge_auto_update_config, location, managed, self_uri].hash
679
+ [id, name, description, version, date_created, date_modified, modified_by, created_by, state, modified_by_app, created_by_app, primary_sites, secondary_sites, primary_edges, secondary_edges, addresses, edges, edge_auto_update_config, location, managed, ntp_settings, self_uri].hash
654
680
  end
655
681
 
656
682
  # build the object from hash
@@ -24,9 +24,12 @@ module PureCloud
24
24
  # If disabled no trustee user will have access, even if they were previously added.
25
25
  attr_accessor :enabled
26
26
 
27
- # The list of users and their roles to which access will be granted. The users are from the trustee and the roles are from the trustor.
27
+ # The list of users and their roles to which access will be granted. The users are from the trustee and the roles are from the trustor. If no users are specified, at least one group is required.
28
28
  attr_accessor :users
29
29
 
30
+ # The list of groups and their roles to which access will be granted. The groups are from the trustee and the roles are from the trustor. If no groups are specified, at least one user is required.
31
+ attr_accessor :groups
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
@@ -35,7 +38,9 @@ module PureCloud
35
38
 
36
39
  :'enabled' => :'enabled',
37
40
 
38
- :'users' => :'users'
41
+ :'users' => :'users',
42
+
43
+ :'groups' => :'groups'
39
44
 
40
45
  }
41
46
  end
@@ -48,7 +53,9 @@ module PureCloud
48
53
 
49
54
  :'enabled' => :'BOOLEAN',
50
55
 
51
- :'users' => :'Array<TrustUserCreate>'
56
+ :'users' => :'Array<TrustMemberCreate>',
57
+
58
+ :'groups' => :'Array<TrustMemberCreate>'
52
59
 
53
60
  }
54
61
  end
@@ -91,6 +98,17 @@ module PureCloud
91
98
  end
92
99
 
93
100
 
101
+ if attributes.has_key?(:'groups')
102
+
103
+ if (value = attributes[:'groups']).is_a?(Array)
104
+ self.groups = value
105
+ end
106
+
107
+
108
+
109
+ end
110
+
111
+
94
112
  end
95
113
 
96
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -125,10 +143,9 @@ module PureCloud
125
143
 
126
144
 
127
145
 
128
- if @users.nil?
129
- return false
130
- end
131
-
146
+
147
+
148
+
132
149
 
133
150
 
134
151
 
@@ -149,6 +166,11 @@ module PureCloud
149
166
 
150
167
 
151
168
 
169
+
170
+
171
+
172
+
173
+
152
174
 
153
175
 
154
176
  # Checks equality by comparing each attribute.
@@ -158,7 +180,8 @@ module PureCloud
158
180
  self.class == o.class &&
159
181
  pairing_id == o.pairing_id &&
160
182
  enabled == o.enabled &&
161
- users == o.users
183
+ users == o.users &&
184
+ groups == o.groups
162
185
  end
163
186
 
164
187
  # @see the `==` method
@@ -170,7 +193,7 @@ module PureCloud
170
193
  # Calculates hash code according to all attributes.
171
194
  # @return [Fixnum] Hash code
172
195
  def hash
173
- [pairing_id, enabled, users].hash
196
+ [pairing_id, enabled, users, groups].hash
174
197
  end
175
198
 
176
199
  # build the object from hash
@@ -0,0 +1,603 @@
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 TrustGroup
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ # The group name.
25
+ attr_accessor :name
26
+
27
+ attr_accessor :description
28
+
29
+ # Last modified date/time. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
30
+ attr_accessor :date_modified
31
+
32
+ # Number of members.
33
+ attr_accessor :member_count
34
+
35
+ # Active, inactive, or deleted state.
36
+ attr_accessor :state
37
+
38
+ # Current version for this resource.
39
+ attr_accessor :version
40
+
41
+ # Type of group.
42
+ attr_accessor :type
43
+
44
+ attr_accessor :images
45
+
46
+ attr_accessor :addresses
47
+
48
+ # Are membership rules visible to the person requesting to view the group
49
+ attr_accessor :rules_visible
50
+
51
+ # Who can view this group
52
+ attr_accessor :visibility
53
+
54
+ # The date on which the trusted group was added. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
55
+ attr_accessor :date_created
56
+
57
+ # The user that added trusted group.
58
+ attr_accessor :created_by
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
+ :'description' => :'description',
69
+
70
+ :'date_modified' => :'dateModified',
71
+
72
+ :'member_count' => :'memberCount',
73
+
74
+ :'state' => :'state',
75
+
76
+ :'version' => :'version',
77
+
78
+ :'type' => :'type',
79
+
80
+ :'images' => :'images',
81
+
82
+ :'addresses' => :'addresses',
83
+
84
+ :'rules_visible' => :'rulesVisible',
85
+
86
+ :'visibility' => :'visibility',
87
+
88
+ :'date_created' => :'dateCreated',
89
+
90
+ :'created_by' => :'createdBy'
91
+
92
+ }
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.swagger_types
97
+ {
98
+
99
+ :'id' => :'String',
100
+
101
+ :'name' => :'String',
102
+
103
+ :'description' => :'String',
104
+
105
+ :'date_modified' => :'DateTime',
106
+
107
+ :'member_count' => :'Integer',
108
+
109
+ :'state' => :'String',
110
+
111
+ :'version' => :'Integer',
112
+
113
+ :'type' => :'String',
114
+
115
+ :'images' => :'Array<UserImage>',
116
+
117
+ :'addresses' => :'Array<GroupContact>',
118
+
119
+ :'rules_visible' => :'BOOLEAN',
120
+
121
+ :'visibility' => :'String',
122
+
123
+ :'date_created' => :'DateTime',
124
+
125
+ :'created_by' => :'OrgUser'
126
+
127
+ }
128
+ end
129
+
130
+ # Initializes the object
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ def initialize(attributes = {})
133
+ return unless attributes.is_a?(Hash)
134
+
135
+ # convert string to symbol for hash key
136
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
137
+
138
+
139
+ if attributes.has_key?(:'id')
140
+
141
+
142
+ self.id = attributes[:'id']
143
+
144
+
145
+ end
146
+
147
+
148
+ if attributes.has_key?(:'name')
149
+
150
+
151
+ self.name = attributes[:'name']
152
+
153
+
154
+ end
155
+
156
+
157
+ if attributes.has_key?(:'description')
158
+
159
+
160
+ self.description = attributes[:'description']
161
+
162
+
163
+ end
164
+
165
+
166
+ if attributes.has_key?(:'dateModified')
167
+
168
+
169
+ self.date_modified = attributes[:'dateModified']
170
+
171
+
172
+ end
173
+
174
+
175
+ if attributes.has_key?(:'memberCount')
176
+
177
+
178
+ self.member_count = attributes[:'memberCount']
179
+
180
+
181
+ end
182
+
183
+
184
+ if attributes.has_key?(:'state')
185
+
186
+
187
+ self.state = attributes[:'state']
188
+
189
+
190
+ end
191
+
192
+
193
+ if attributes.has_key?(:'version')
194
+
195
+
196
+ self.version = attributes[:'version']
197
+
198
+
199
+ end
200
+
201
+
202
+ if attributes.has_key?(:'type')
203
+
204
+
205
+ self.type = attributes[:'type']
206
+
207
+
208
+ end
209
+
210
+
211
+ if attributes.has_key?(:'images')
212
+
213
+ if (value = attributes[:'images']).is_a?(Array)
214
+ self.images = value
215
+ end
216
+
217
+
218
+
219
+ end
220
+
221
+
222
+ if attributes.has_key?(:'addresses')
223
+
224
+ if (value = attributes[:'addresses']).is_a?(Array)
225
+ self.addresses = value
226
+ end
227
+
228
+
229
+
230
+ end
231
+
232
+
233
+ if attributes.has_key?(:'rulesVisible')
234
+
235
+
236
+ self.rules_visible = attributes[:'rulesVisible']
237
+
238
+
239
+ end
240
+
241
+
242
+ if attributes.has_key?(:'visibility')
243
+
244
+
245
+ self.visibility = attributes[:'visibility']
246
+
247
+
248
+ end
249
+
250
+
251
+ if attributes.has_key?(:'dateCreated')
252
+
253
+
254
+ self.date_created = attributes[:'dateCreated']
255
+
256
+
257
+ end
258
+
259
+
260
+ if attributes.has_key?(:'createdBy')
261
+
262
+
263
+ self.created_by = attributes[:'createdBy']
264
+
265
+
266
+ end
267
+
268
+
269
+ end
270
+
271
+ # Show invalid properties with the reasons. Usually used together with valid?
272
+ # @return Array for valid properies with the reasons
273
+ def list_invalid_properties
274
+ invalid_properties = Array.new
275
+
276
+
277
+ return invalid_properties
278
+ end
279
+
280
+ # Check to see if the all the properties in the model are valid
281
+ # @return true if the model is valid
282
+ def valid?
283
+
284
+
285
+
286
+
287
+
288
+
289
+ if @name.nil?
290
+ return false
291
+ end
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+ allowed_values = ["active", "inactive", "deleted"]
312
+ if @state && !allowed_values.include?(@state)
313
+ return false
314
+ end
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ if @type.nil?
324
+ return false
325
+ end
326
+
327
+
328
+
329
+ allowed_values = ["official", "social"]
330
+ if @type && !allowed_values.include?(@type)
331
+ return false
332
+ end
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ if @rules_visible.nil?
346
+ return false
347
+ end
348
+
349
+
350
+
351
+
352
+
353
+
354
+ if @visibility.nil?
355
+ return false
356
+ end
357
+
358
+
359
+
360
+ allowed_values = ["public", "owners", "members"]
361
+ if @visibility && !allowed_values.include?(@visibility)
362
+ return false
363
+ end
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+ end
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
+ # Custom attribute writer method checking allowed values (enum).
405
+ # @param [Object] state Object to be assigned
406
+ def state=(state)
407
+ allowed_values = ["active", "inactive", "deleted"]
408
+ if state && !allowed_values.include?(state)
409
+ fail ArgumentError, "invalid value for 'state', must be one of #{allowed_values}."
410
+ end
411
+ @state = state
412
+ end
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+ # Custom attribute writer method checking allowed values (enum).
424
+ # @param [Object] type Object to be assigned
425
+ def type=(type)
426
+ allowed_values = ["official", "social"]
427
+ if type && !allowed_values.include?(type)
428
+ fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
429
+ end
430
+ @type = type
431
+ end
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+ # Custom attribute writer method checking allowed values (enum).
453
+ # @param [Object] visibility Object to be assigned
454
+ def visibility=(visibility)
455
+ allowed_values = ["public", "owners", "members"]
456
+ if visibility && !allowed_values.include?(visibility)
457
+ fail ArgumentError, "invalid value for 'visibility', must be one of #{allowed_values}."
458
+ end
459
+ @visibility = visibility
460
+ end
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+ # Checks equality by comparing each attribute.
476
+ # @param [Object] Object to be compared
477
+ def ==(o)
478
+ return true if self.equal?(o)
479
+ self.class == o.class &&
480
+ id == o.id &&
481
+ name == o.name &&
482
+ description == o.description &&
483
+ date_modified == o.date_modified &&
484
+ member_count == o.member_count &&
485
+ state == o.state &&
486
+ version == o.version &&
487
+ type == o.type &&
488
+ images == o.images &&
489
+ addresses == o.addresses &&
490
+ rules_visible == o.rules_visible &&
491
+ visibility == o.visibility &&
492
+ date_created == o.date_created &&
493
+ created_by == o.created_by
494
+ end
495
+
496
+ # @see the `==` method
497
+ # @param [Object] Object to be compared
498
+ def eql?(o)
499
+ self == o
500
+ end
501
+
502
+ # Calculates hash code according to all attributes.
503
+ # @return [Fixnum] Hash code
504
+ def hash
505
+ [id, name, description, date_modified, member_count, state, version, type, images, addresses, rules_visible, visibility, date_created, created_by].hash
506
+ end
507
+
508
+ # build the object from hash
509
+ def build_from_hash(attributes)
510
+ return nil unless attributes.is_a?(Hash)
511
+ self.class.swagger_types.each_pair do |key, type|
512
+ if type =~ /^Array<(.*)>/i
513
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
514
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
515
+ else
516
+ #TODO show warning in debug mode
517
+ end
518
+ elsif !attributes[self.class.attribute_map[key]].nil?
519
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
520
+ else
521
+ # data not found in attributes(hash), not an issue as the data can be optional
522
+ end
523
+ end
524
+
525
+ self
526
+ end
527
+
528
+ def _deserialize(type, value)
529
+ case type.to_sym
530
+ when :DateTime
531
+ DateTime.parse(value)
532
+ when :Date
533
+ Date.parse(value)
534
+ when :String
535
+ value.to_s
536
+ when :Integer
537
+ value.to_i
538
+ when :Float
539
+ value.to_f
540
+ when :BOOLEAN
541
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
542
+ true
543
+ else
544
+ false
545
+ end
546
+ when :Object
547
+ # generic object (usually a Hash), return directly
548
+ value
549
+ when /\AArray<(?<inner_type>.+)>\z/
550
+ inner_type = Regexp.last_match[:inner_type]
551
+ value.map { |v| _deserialize(inner_type, v) }
552
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
553
+ k_type = Regexp.last_match[:k_type]
554
+ v_type = Regexp.last_match[:v_type]
555
+ {}.tap do |hash|
556
+ value.each do |k, v|
557
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
558
+ end
559
+ end
560
+ else # model
561
+ _model = Object.const_get("PureCloud").const_get(type).new
562
+ _model.build_from_hash(value)
563
+ end
564
+ end
565
+
566
+ def to_s
567
+ to_hash.to_s
568
+ end
569
+
570
+ # to_body is an alias to to_body (backward compatibility))
571
+ def to_body
572
+ to_hash
573
+ end
574
+
575
+ # return the object in the form of hash
576
+ def to_hash
577
+ hash = {}
578
+ self.class.attribute_map.each_pair do |attr, param|
579
+ value = self.send(attr)
580
+ next if value.nil?
581
+ hash[param] = _to_hash(value)
582
+ end
583
+ hash
584
+ end
585
+
586
+ # Method to output non-array value in the form of hash
587
+ # For object, use to_hash. Otherwise, just return the value
588
+ def _to_hash(value)
589
+ if value.is_a?(Array)
590
+ value.compact.map{ |v| _to_hash(v) }
591
+ elsif value.is_a?(Hash)
592
+ {}.tap do |hash|
593
+ value.each { |k, v| hash[k] = _to_hash(v) }
594
+ end
595
+ elsif value.respond_to? :to_hash
596
+ value.to_hash
597
+ else
598
+ value
599
+ end
600
+ end
601
+
602
+ end
603
+ end