purecloudplatformclientv2 22.0.0 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/ActivityCode.md +8 -5
- data/docs/ActivityCodeContainer.md +1 -0
- data/docs/AdherenceSettings.md +1 -1
- data/docs/ArchitectApi.md +14 -14
- data/docs/AuthorizationApi.md +3 -1
- data/docs/BatchDownloadJobResult.md +20 -0
- data/docs/BatchDownloadJobStatusResult.md +20 -0
- data/docs/BatchDownloadJobSubmission.md +13 -0
- data/docs/BatchDownloadJobSubmissionResult.md +15 -0
- data/docs/BatchDownloadRequest.md +14 -0
- data/docs/Call.md +2 -0
- data/docs/CallBasic.md +2 -0
- data/docs/CallForwardingNotification.md +17 -0
- data/docs/CallForwardingNotificationCall.md +13 -0
- data/docs/CallForwardingNotificationCalls.md +13 -0
- data/docs/CallForwardingNotificationTarget.md +14 -0
- data/docs/CallForwardingNotificationTargets.md +14 -0
- data/docs/CallForwardingNotificationUser.md +13 -0
- data/docs/CallRoute.md +0 -1
- data/docs/{SignedData.md → ContactColumnTimeZone.md} +2 -3
- data/docs/CreateActivityCodeRequest.md +18 -0
- data/docs/CreateQueueRequest.md +12 -11
- data/docs/ExternalContact.md +1 -0
- data/docs/IgnoredActivityCategories.md +13 -0
- data/docs/ManagementUnit.md +4 -3
- data/docs/ManagementUnitSettings.md +1 -3
- data/docs/MessageDetails.md +1 -0
- data/docs/MessageMedia.md +14 -0
- data/docs/MoveAgentResponse.md +14 -0
- data/docs/MoveAgentsRequest.md +14 -0
- data/docs/MoveAgentsResponse.md +15 -0
- data/docs/NTPSettings.md +13 -0
- data/docs/OrganizationAuthorizationApi.md +2 -2
- data/docs/OutOfOfficeNotification.md +1 -0
- data/docs/OutboundApi.md +63 -0
- data/docs/Queue.md +12 -11
- data/docs/Recording.md +1 -0
- data/docs/RecordingApi.md +120 -0
- data/docs/RecordingMessagingMessage.md +18 -0
- data/docs/RoutingApi.md +2 -2
- data/docs/SchedulingSettings.md +1 -0
- data/docs/ShrinkageOverride.md +14 -0
- data/docs/ShrinkageOverrides.md +14 -0
- data/docs/Site.md +1 -0
- data/docs/TrustCreate.md +2 -1
- data/docs/TrustGroup.md +26 -0
- data/docs/{TrustUserCreate.md → TrustMemberCreate.md} +4 -4
- data/docs/TrustRequest.md +2 -1
- data/docs/TrustRequestCreate.md +2 -1
- data/docs/UserQueue.md +12 -11
- data/docs/WfmVersionedEntityMetadata.md +15 -0
- data/docs/WorkforceManagementApi.md +128 -3
- data/docs/{Entity.md → WrapUpCodeReference.md} +2 -2
- data/lib/purecloudplatformclientv2.rb +26 -4
- data/lib/purecloudplatformclientv2/api/architect_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api/authorization_api.rb +9 -0
- data/lib/purecloudplatformclientv2/api/outbound_api.rb +75 -0
- data/lib/purecloudplatformclientv2/api/recording_api.rb +130 -0
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +138 -2
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/activity_code.rb +95 -12
- data/lib/purecloudplatformclientv2/models/activity_code_container.rb +35 -4
- data/lib/purecloudplatformclientv2/models/adherence_settings.rb +2 -4
- data/lib/purecloudplatformclientv2/models/batch_download_job_result.rb +383 -0
- data/lib/purecloudplatformclientv2/models/batch_download_job_status_result.rb +385 -0
- data/lib/purecloudplatformclientv2/models/batch_download_job_submission.rb +209 -0
- data/lib/purecloudplatformclientv2/models/batch_download_job_submission_result.rb +253 -0
- data/lib/purecloudplatformclientv2/models/batch_download_request.rb +228 -0
- data/lib/purecloudplatformclientv2/models/call.rb +56 -4
- data/lib/purecloudplatformclientv2/models/call_basic.rb +56 -4
- data/lib/purecloudplatformclientv2/models/call_forwarding_notification.rb +303 -0
- data/lib/purecloudplatformclientv2/models/call_forwarding_notification_call.rb +203 -0
- data/lib/purecloudplatformclientv2/models/call_forwarding_notification_calls.rb +203 -0
- data/lib/purecloudplatformclientv2/models/call_forwarding_notification_target.rb +226 -0
- data/lib/purecloudplatformclientv2/models/call_forwarding_notification_targets.rb +226 -0
- data/lib/purecloudplatformclientv2/models/{signed_data.rb → call_forwarding_notification_user.rb} +8 -8
- data/lib/purecloudplatformclientv2/models/call_route.rb +4 -30
- data/lib/purecloudplatformclientv2/models/contact_column_time_zone.rb +176 -0
- data/lib/purecloudplatformclientv2/models/create_activity_code_request.rb +358 -0
- data/lib/purecloudplatformclientv2/models/create_queue_request.rb +38 -12
- data/lib/purecloudplatformclientv2/models/dependency.rb +2 -2
- data/lib/purecloudplatformclientv2/models/dependency_object.rb +2 -2
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/external_contact.rb +26 -1
- data/lib/purecloudplatformclientv2/models/ignored_activity_categories.rb +204 -0
- data/lib/purecloudplatformclientv2/models/management_unit.rb +36 -5
- data/lib/purecloudplatformclientv2/models/management_unit_settings.rb +9 -61
- data/lib/purecloudplatformclientv2/models/message_details.rb +32 -4
- data/lib/purecloudplatformclientv2/models/message_media.rb +228 -0
- data/lib/purecloudplatformclientv2/models/move_agent_response.rb +243 -0
- data/lib/purecloudplatformclientv2/models/move_agents_request.rb +236 -0
- data/lib/purecloudplatformclientv2/models/move_agents_response.rb +257 -0
- data/lib/purecloudplatformclientv2/models/ntp_settings.rb +204 -0
- data/lib/purecloudplatformclientv2/models/out_of_office_notification.rb +26 -1
- data/lib/purecloudplatformclientv2/models/prediction_results.rb +2 -2
- data/lib/purecloudplatformclientv2/models/queue.rb +38 -12
- data/lib/purecloudplatformclientv2/models/recording.rb +29 -1
- data/lib/purecloudplatformclientv2/models/recording_messaging_message.rb +327 -0
- data/lib/purecloudplatformclientv2/models/scheduling_settings.rb +30 -4
- data/lib/purecloudplatformclientv2/models/shrinkage_override.rb +233 -0
- data/lib/purecloudplatformclientv2/models/shrinkage_overrides.rb +230 -0
- data/lib/purecloudplatformclientv2/models/site.rb +27 -1
- data/lib/purecloudplatformclientv2/models/trust_create.rb +32 -9
- data/lib/purecloudplatformclientv2/models/trust_group.rb +603 -0
- data/lib/purecloudplatformclientv2/models/{trust_user_create.rb → trust_member_create.rb} +3 -3
- data/lib/purecloudplatformclientv2/models/trust_request.rb +28 -5
- data/lib/purecloudplatformclientv2/models/trust_request_create.rb +32 -9
- data/lib/purecloudplatformclientv2/models/user_queue.rb +38 -12
- data/lib/purecloudplatformclientv2/models/wfm_versioned_entity_metadata.rb +260 -0
- data/lib/purecloudplatformclientv2/models/{entity.rb → wrap_up_code_reference.rb} +1 -1
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +54 -10
- data/docs/SignedDataApi.md +0 -73
- data/lib/purecloudplatformclientv2/api/signed_data_api.rb +0 -90
|
@@ -33,6 +33,9 @@ module PureCloud
|
|
|
33
33
|
# The time when the message was sent or received. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
|
34
34
|
attr_accessor :message_time
|
|
35
35
|
|
|
36
|
+
# The media (images, files, etc) associated with this message, if any
|
|
37
|
+
attr_accessor :media
|
|
38
|
+
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
40
|
def self.attribute_map
|
|
38
41
|
{
|
|
@@ -45,7 +48,9 @@ module PureCloud
|
|
|
45
48
|
|
|
46
49
|
:'message_segment_count' => :'messageSegmentCount',
|
|
47
50
|
|
|
48
|
-
:'message_time' => :'messageTime'
|
|
51
|
+
:'message_time' => :'messageTime',
|
|
52
|
+
|
|
53
|
+
:'media' => :'media'
|
|
49
54
|
|
|
50
55
|
}
|
|
51
56
|
end
|
|
@@ -62,7 +67,9 @@ module PureCloud
|
|
|
62
67
|
|
|
63
68
|
:'message_segment_count' => :'Integer',
|
|
64
69
|
|
|
65
|
-
:'message_time' => :'DateTime'
|
|
70
|
+
:'message_time' => :'DateTime',
|
|
71
|
+
|
|
72
|
+
:'media' => :'Array<MessageMedia>'
|
|
66
73
|
|
|
67
74
|
}
|
|
68
75
|
end
|
|
@@ -121,6 +128,17 @@ module PureCloud
|
|
|
121
128
|
end
|
|
122
129
|
|
|
123
130
|
|
|
131
|
+
if attributes.has_key?(:'media')
|
|
132
|
+
|
|
133
|
+
if (value = attributes[:'media']).is_a?(Array)
|
|
134
|
+
self.media = value
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
|
|
124
142
|
end
|
|
125
143
|
|
|
126
144
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -161,6 +179,10 @@ module PureCloud
|
|
|
161
179
|
|
|
162
180
|
|
|
163
181
|
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
164
186
|
end
|
|
165
187
|
|
|
166
188
|
|
|
@@ -198,6 +220,11 @@ module PureCloud
|
|
|
198
220
|
|
|
199
221
|
|
|
200
222
|
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
201
228
|
# Checks equality by comparing each attribute.
|
|
202
229
|
# @param [Object] Object to be compared
|
|
203
230
|
def ==(o)
|
|
@@ -207,7 +234,8 @@ module PureCloud
|
|
|
207
234
|
message_uri == o.message_uri &&
|
|
208
235
|
message_status == o.message_status &&
|
|
209
236
|
message_segment_count == o.message_segment_count &&
|
|
210
|
-
message_time == o.message_time
|
|
237
|
+
message_time == o.message_time &&
|
|
238
|
+
media == o.media
|
|
211
239
|
end
|
|
212
240
|
|
|
213
241
|
# @see the `==` method
|
|
@@ -219,7 +247,7 @@ module PureCloud
|
|
|
219
247
|
# Calculates hash code according to all attributes.
|
|
220
248
|
# @return [Fixnum] Hash code
|
|
221
249
|
def hash
|
|
222
|
-
[message_id, message_uri, message_status, message_segment_count, message_time].hash
|
|
250
|
+
[message_id, message_uri, message_status, message_segment_count, message_time, media].hash
|
|
223
251
|
end
|
|
224
252
|
|
|
225
253
|
# build the object from hash
|
|
@@ -0,0 +1,228 @@
|
|
|
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 MessageMedia
|
|
21
|
+
# The location of the media, useful for retrieving it
|
|
22
|
+
attr_accessor :url
|
|
23
|
+
|
|
24
|
+
# The optional internet media type of the the media object. If null then the media type should be dictated by the url
|
|
25
|
+
attr_accessor :media_type
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
|
|
31
|
+
:'url' => :'url',
|
|
32
|
+
|
|
33
|
+
:'media_type' => :'mediaType'
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.swagger_types
|
|
40
|
+
{
|
|
41
|
+
|
|
42
|
+
:'url' => :'String',
|
|
43
|
+
|
|
44
|
+
:'media_type' => :'String'
|
|
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?(:'url')
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
self.url = attributes[:'url']
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if attributes.has_key?(:'mediaType')
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
self.media_type = attributes[:'mediaType']
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
79
|
+
# @return Array for valid properies with the reasons
|
|
80
|
+
def list_invalid_properties
|
|
81
|
+
invalid_properties = Array.new
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
return invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
url == o.url &&
|
|
118
|
+
media_type == o.media_type
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see the `==` method
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def eql?(o)
|
|
124
|
+
self == o
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Fixnum] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[url, media_type].hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# build the object from hash
|
|
134
|
+
def build_from_hash(attributes)
|
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
|
136
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
137
|
+
if type =~ /^Array<(.*)>/i
|
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
140
|
+
else
|
|
141
|
+
#TODO show warning in debug mode
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
144
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
145
|
+
else
|
|
146
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
self
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def _deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :DateTime
|
|
156
|
+
DateTime.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :BOOLEAN
|
|
166
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
187
|
+
_model.build_from_hash(value)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def to_s
|
|
192
|
+
to_hash.to_s
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
196
|
+
def to_body
|
|
197
|
+
to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# return the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
hash = {}
|
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
204
|
+
value = self.send(attr)
|
|
205
|
+
next if value.nil?
|
|
206
|
+
hash[param] = _to_hash(value)
|
|
207
|
+
end
|
|
208
|
+
hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Method to output non-array value in the form of hash
|
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
213
|
+
def _to_hash(value)
|
|
214
|
+
if value.is_a?(Array)
|
|
215
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
216
|
+
elsif value.is_a?(Hash)
|
|
217
|
+
{}.tap do |hash|
|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
219
|
+
end
|
|
220
|
+
elsif value.respond_to? :to_hash
|
|
221
|
+
value.to_hash
|
|
222
|
+
else
|
|
223
|
+
value
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
end
|
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
# Response for move agents query
|
|
21
|
+
class MoveAgentResponse
|
|
22
|
+
# The user associated with the move
|
|
23
|
+
attr_accessor :user
|
|
24
|
+
|
|
25
|
+
# The result of the move
|
|
26
|
+
attr_accessor :result
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
|
|
32
|
+
:'user' => :'user',
|
|
33
|
+
|
|
34
|
+
:'result' => :'result'
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.swagger_types
|
|
41
|
+
{
|
|
42
|
+
|
|
43
|
+
:'user' => :'UserReference',
|
|
44
|
+
|
|
45
|
+
:'result' => :'String'
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
if attributes.has_key?(:'user')
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
self.user = attributes[:'user']
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if attributes.has_key?(:'result')
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
self.result = attributes[:'result']
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properies with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
invalid_properties = Array.new
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
return invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
allowed_values = ["MoveSuccessful", "NothingToDo", "AlreadyMoved", "DestinationManagementUnitDoesNotExist", "DestinationManagementUnitAgentLimitExceeded", "MovingToDifferentManagementUnit"]
|
|
99
|
+
if @result && !allowed_values.include?(@result)
|
|
100
|
+
return false
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
115
|
+
# @param [Object] result Object to be assigned
|
|
116
|
+
def result=(result)
|
|
117
|
+
allowed_values = ["MoveSuccessful", "NothingToDo", "AlreadyMoved", "DestinationManagementUnitDoesNotExist", "DestinationManagementUnitAgentLimitExceeded", "MovingToDifferentManagementUnit"]
|
|
118
|
+
if result && !allowed_values.include?(result)
|
|
119
|
+
fail ArgumentError, "invalid value for 'result', must be one of #{allowed_values}."
|
|
120
|
+
end
|
|
121
|
+
@result = result
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# Checks equality by comparing each attribute.
|
|
128
|
+
# @param [Object] Object to be compared
|
|
129
|
+
def ==(o)
|
|
130
|
+
return true if self.equal?(o)
|
|
131
|
+
self.class == o.class &&
|
|
132
|
+
user == o.user &&
|
|
133
|
+
result == o.result
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @see the `==` method
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def eql?(o)
|
|
139
|
+
self == o
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Calculates hash code according to all attributes.
|
|
143
|
+
# @return [Fixnum] Hash code
|
|
144
|
+
def hash
|
|
145
|
+
[user, result].hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# build the object from hash
|
|
149
|
+
def build_from_hash(attributes)
|
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
|
151
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
152
|
+
if type =~ /^Array<(.*)>/i
|
|
153
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
154
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
155
|
+
else
|
|
156
|
+
#TODO show warning in debug mode
|
|
157
|
+
end
|
|
158
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
159
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
160
|
+
else
|
|
161
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
self
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def _deserialize(type, value)
|
|
169
|
+
case type.to_sym
|
|
170
|
+
when :DateTime
|
|
171
|
+
DateTime.parse(value)
|
|
172
|
+
when :Date
|
|
173
|
+
Date.parse(value)
|
|
174
|
+
when :String
|
|
175
|
+
value.to_s
|
|
176
|
+
when :Integer
|
|
177
|
+
value.to_i
|
|
178
|
+
when :Float
|
|
179
|
+
value.to_f
|
|
180
|
+
when :BOOLEAN
|
|
181
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
182
|
+
true
|
|
183
|
+
else
|
|
184
|
+
false
|
|
185
|
+
end
|
|
186
|
+
when :Object
|
|
187
|
+
# generic object (usually a Hash), return directly
|
|
188
|
+
value
|
|
189
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
190
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
191
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
192
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
193
|
+
k_type = Regexp.last_match[:k_type]
|
|
194
|
+
v_type = Regexp.last_match[:v_type]
|
|
195
|
+
{}.tap do |hash|
|
|
196
|
+
value.each do |k, v|
|
|
197
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
else # model
|
|
201
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
202
|
+
_model.build_from_hash(value)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
def to_s
|
|
207
|
+
to_hash.to_s
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
211
|
+
def to_body
|
|
212
|
+
to_hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# return the object in the form of hash
|
|
216
|
+
def to_hash
|
|
217
|
+
hash = {}
|
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
219
|
+
value = self.send(attr)
|
|
220
|
+
next if value.nil?
|
|
221
|
+
hash[param] = _to_hash(value)
|
|
222
|
+
end
|
|
223
|
+
hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Method to output non-array value in the form of hash
|
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
228
|
+
def _to_hash(value)
|
|
229
|
+
if value.is_a?(Array)
|
|
230
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
231
|
+
elsif value.is_a?(Hash)
|
|
232
|
+
{}.tap do |hash|
|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
234
|
+
end
|
|
235
|
+
elsif value.respond_to? :to_hash
|
|
236
|
+
value.to_hash
|
|
237
|
+
else
|
|
238
|
+
value
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
end
|