purecloudplatformclientv2 27.1.0 → 28.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/AdditionalMessage.md +13 -0
- data/docs/AnalyticsParticipant.md +1 -0
- data/docs/ArchitectApi.md +40 -28
- data/docs/Attachment.md +5 -5
- data/docs/ConversationNotificationAttachment.md +18 -0
- data/docs/ConversationNotificationDraftAttachments.md +18 -0
- data/docs/ConversationNotificationEmail.md +1 -0
- data/docs/ConversationNotificationEmails.md +1 -0
- data/docs/ConversationsApi.md +964 -198
- data/docs/DataTable.md +17 -0
- data/docs/DataTableRowEntityListing.md +22 -0
- data/docs/DataTablesDomainEntityListing.md +22 -0
- data/docs/Document.md +1 -1
- data/docs/DomainEdgeSoftwareVersionDto.md +1 -1
- data/docs/DomainOrganizationRole.md +1 -1
- data/docs/DomainOrganizationRoleCreate.md +1 -1
- data/docs/DomainOrganizationRoleUpdate.md +1 -1
- data/docs/Email.md +1 -0
- data/docs/EmailConversationNotificationAttachment.md +18 -0
- data/docs/EmailConversationNotificationEmailMediaParticipant.md +1 -0
- data/docs/EmailConversationNotificationParticipants.md +1 -0
- data/docs/EmailMediaParticipant.md +1 -0
- data/docs/FaxDocument.md +1 -1
- data/docs/JsonNode.md +4 -4
- data/docs/MessageConversation.md +17 -0
- data/docs/MessageConversationEntityListing.md +22 -0
- data/docs/MessageData.md +25 -0
- data/docs/MessageMediaParticipant.md +44 -0
- data/docs/Question.md +1 -1
- data/docs/Recipient.md +20 -0
- data/docs/RecipientListing.md +22 -0
- data/docs/RoutingApi.md +632 -0
- data/docs/SMSAvailablePhoneNumberEntityListing.md +13 -0
- data/docs/SmsAddressProvision.md +21 -0
- data/docs/SmsAvailablePhoneNumber.md +22 -0
- data/docs/SmsPhoneNumber.md +25 -0
- data/docs/SmsPhoneNumberEntityListing.md +22 -0
- data/docs/SmsPhoneNumberProvision.md +18 -0
- data/docs/TextMessageListing.md +22 -0
- data/lib/purecloudplatformclientv2.rb +20 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +108 -34
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +1247 -317
- data/lib/purecloudplatformclientv2/api/routing_api.rb +829 -43
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/additional_message.rb +207 -0
- data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_participant.rb +41 -1
- data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +4 -4
- data/lib/purecloudplatformclientv2/models/attachment.rb +5 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_attachment.rb +326 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_draft_attachments.rb +326 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_email.rb +28 -1
- data/lib/purecloudplatformclientv2/models/conversation_notification_emails.rb +28 -1
- data/lib/purecloudplatformclientv2/models/data_table.rb +306 -0
- data/lib/purecloudplatformclientv2/models/data_table_row_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/data_tables_domain_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/document.rb +12 -12
- data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto.rb +12 -12
- data/lib/purecloudplatformclientv2/models/domain_organization_role.rb +12 -12
- data/lib/purecloudplatformclientv2/models/domain_organization_role_create.rb +12 -12
- data/lib/purecloudplatformclientv2/models/domain_organization_role_update.rb +12 -12
- data/lib/purecloudplatformclientv2/models/email.rb +32 -4
- data/lib/purecloudplatformclientv2/models/email_conversation_notification_attachment.rb +326 -0
- data/lib/purecloudplatformclientv2/models/email_conversation_notification_email_media_participant.rb +31 -4
- data/lib/purecloudplatformclientv2/models/email_conversation_notification_participants.rb +31 -4
- data/lib/purecloudplatformclientv2/models/email_media_participant.rb +32 -4
- data/lib/purecloudplatformclientv2/models/fax_document.rb +12 -12
- data/lib/purecloudplatformclientv2/models/json_node.rb +72 -72
- data/lib/purecloudplatformclientv2/models/message_conversation.rb +309 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/message_data.rb +572 -0
- data/lib/purecloudplatformclientv2/models/message_media_participant.rb +1068 -0
- data/lib/purecloudplatformclientv2/models/question.rb +13 -13
- data/lib/purecloudplatformclientv2/models/recipient.rb +383 -0
- data/lib/purecloudplatformclientv2/models/recipient_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/sms_address_provision.rb +440 -0
- data/lib/purecloudplatformclientv2/models/sms_available_phone_number.rb +465 -0
- data/lib/purecloudplatformclientv2/models/sms_available_phone_number_entity_listing.rb +203 -0
- data/lib/purecloudplatformclientv2/models/sms_phone_number.rb +546 -0
- data/lib/purecloudplatformclientv2/models/sms_phone_number_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/sms_phone_number_provision.rb +360 -0
- data/lib/purecloudplatformclientv2/models/text_message_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +42 -2
@@ -30,10 +30,10 @@ module PureCloud
|
|
30
30
|
|
31
31
|
attr_accessor :edge_uri
|
32
32
|
|
33
|
-
attr_accessor :latest_release
|
34
|
-
|
35
33
|
attr_accessor :current
|
36
34
|
|
35
|
+
attr_accessor :latest_release
|
36
|
+
|
37
37
|
# The URI for this object
|
38
38
|
attr_accessor :self_uri
|
39
39
|
|
@@ -51,10 +51,10 @@ module PureCloud
|
|
51
51
|
|
52
52
|
:'edge_uri' => :'edgeUri',
|
53
53
|
|
54
|
-
:'latest_release' => :'latestRelease',
|
55
|
-
|
56
54
|
:'current' => :'current',
|
57
55
|
|
56
|
+
:'latest_release' => :'latestRelease',
|
57
|
+
|
58
58
|
:'self_uri' => :'selfUri'
|
59
59
|
|
60
60
|
}
|
@@ -74,10 +74,10 @@ module PureCloud
|
|
74
74
|
|
75
75
|
:'edge_uri' => :'String',
|
76
76
|
|
77
|
-
:'latest_release' => :'BOOLEAN',
|
78
|
-
|
79
77
|
:'current' => :'BOOLEAN',
|
80
78
|
|
79
|
+
:'latest_release' => :'BOOLEAN',
|
80
|
+
|
81
81
|
:'self_uri' => :'String'
|
82
82
|
|
83
83
|
}
|
@@ -137,19 +137,19 @@ module PureCloud
|
|
137
137
|
end
|
138
138
|
|
139
139
|
|
140
|
-
if attributes.has_key?(:'
|
140
|
+
if attributes.has_key?(:'current')
|
141
141
|
|
142
142
|
|
143
|
-
self.
|
143
|
+
self.current = attributes[:'current']
|
144
144
|
|
145
145
|
|
146
146
|
end
|
147
147
|
|
148
148
|
|
149
|
-
if attributes.has_key?(:'
|
149
|
+
if attributes.has_key?(:'latestRelease')
|
150
150
|
|
151
151
|
|
152
|
-
self.
|
152
|
+
self.latest_release = attributes[:'latestRelease']
|
153
153
|
|
154
154
|
|
155
155
|
end
|
@@ -264,8 +264,8 @@ module PureCloud
|
|
264
264
|
edge_version == o.edge_version &&
|
265
265
|
publish_date == o.publish_date &&
|
266
266
|
edge_uri == o.edge_uri &&
|
267
|
-
latest_release == o.latest_release &&
|
268
267
|
current == o.current &&
|
268
|
+
latest_release == o.latest_release &&
|
269
269
|
self_uri == o.self_uri
|
270
270
|
end
|
271
271
|
|
@@ -278,7 +278,7 @@ module PureCloud
|
|
278
278
|
# Calculates hash code according to all attributes.
|
279
279
|
# @return [Fixnum] Hash code
|
280
280
|
def hash
|
281
|
-
[id, name, edge_version, publish_date, edge_uri,
|
281
|
+
[id, name, edge_version, publish_date, edge_uri, current, latest_release, self_uri].hash
|
282
282
|
end
|
283
283
|
|
284
284
|
# build the object from hash
|
@@ -36,10 +36,10 @@ module PureCloud
|
|
36
36
|
# Optional unless patch operation.
|
37
37
|
attr_accessor :role_needs_update
|
38
38
|
|
39
|
-
attr_accessor :base
|
40
|
-
|
41
39
|
attr_accessor :default
|
42
40
|
|
41
|
+
attr_accessor :base
|
42
|
+
|
43
43
|
# The URI for this object
|
44
44
|
attr_accessor :self_uri
|
45
45
|
|
@@ -63,10 +63,10 @@ module PureCloud
|
|
63
63
|
|
64
64
|
:'role_needs_update' => :'roleNeedsUpdate',
|
65
65
|
|
66
|
-
:'base' => :'base',
|
67
|
-
|
68
66
|
:'default' => :'default',
|
69
67
|
|
68
|
+
:'base' => :'base',
|
69
|
+
|
70
70
|
:'self_uri' => :'selfUri'
|
71
71
|
|
72
72
|
}
|
@@ -92,10 +92,10 @@ module PureCloud
|
|
92
92
|
|
93
93
|
:'role_needs_update' => :'BOOLEAN',
|
94
94
|
|
95
|
-
:'base' => :'BOOLEAN',
|
96
|
-
|
97
95
|
:'default' => :'BOOLEAN',
|
98
96
|
|
97
|
+
:'base' => :'BOOLEAN',
|
98
|
+
|
99
99
|
:'self_uri' => :'String'
|
100
100
|
|
101
101
|
}
|
@@ -186,19 +186,19 @@ module PureCloud
|
|
186
186
|
end
|
187
187
|
|
188
188
|
|
189
|
-
if attributes.has_key?(:'
|
189
|
+
if attributes.has_key?(:'default')
|
190
190
|
|
191
191
|
|
192
|
-
self.
|
192
|
+
self.default = attributes[:'default']
|
193
193
|
|
194
194
|
|
195
195
|
end
|
196
196
|
|
197
197
|
|
198
|
-
if attributes.has_key?(:'
|
198
|
+
if attributes.has_key?(:'base')
|
199
199
|
|
200
200
|
|
201
|
-
self.
|
201
|
+
self.base = attributes[:'base']
|
202
202
|
|
203
203
|
|
204
204
|
end
|
@@ -343,8 +343,8 @@ module PureCloud
|
|
343
343
|
permission_policies == o.permission_policies &&
|
344
344
|
user_count == o.user_count &&
|
345
345
|
role_needs_update == o.role_needs_update &&
|
346
|
-
base == o.base &&
|
347
346
|
default == o.default &&
|
347
|
+
base == o.base &&
|
348
348
|
self_uri == o.self_uri
|
349
349
|
end
|
350
350
|
|
@@ -357,7 +357,7 @@ module PureCloud
|
|
357
357
|
# Calculates hash code according to all attributes.
|
358
358
|
# @return [Fixnum] Hash code
|
359
359
|
def hash
|
360
|
-
[id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update,
|
360
|
+
[id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update, default, base, self_uri].hash
|
361
361
|
end
|
362
362
|
|
363
363
|
# build the object from hash
|
@@ -37,10 +37,10 @@ module PureCloud
|
|
37
37
|
# Optional unless patch operation.
|
38
38
|
attr_accessor :role_needs_update
|
39
39
|
|
40
|
-
attr_accessor :base
|
41
|
-
|
42
40
|
attr_accessor :default
|
43
41
|
|
42
|
+
attr_accessor :base
|
43
|
+
|
44
44
|
# The URI for this object
|
45
45
|
attr_accessor :self_uri
|
46
46
|
|
@@ -64,10 +64,10 @@ module PureCloud
|
|
64
64
|
|
65
65
|
:'role_needs_update' => :'roleNeedsUpdate',
|
66
66
|
|
67
|
-
:'base' => :'base',
|
68
|
-
|
69
67
|
:'default' => :'default',
|
70
68
|
|
69
|
+
:'base' => :'base',
|
70
|
+
|
71
71
|
:'self_uri' => :'selfUri'
|
72
72
|
|
73
73
|
}
|
@@ -93,10 +93,10 @@ module PureCloud
|
|
93
93
|
|
94
94
|
:'role_needs_update' => :'BOOLEAN',
|
95
95
|
|
96
|
-
:'base' => :'BOOLEAN',
|
97
|
-
|
98
96
|
:'default' => :'BOOLEAN',
|
99
97
|
|
98
|
+
:'base' => :'BOOLEAN',
|
99
|
+
|
100
100
|
:'self_uri' => :'String'
|
101
101
|
|
102
102
|
}
|
@@ -187,19 +187,19 @@ module PureCloud
|
|
187
187
|
end
|
188
188
|
|
189
189
|
|
190
|
-
if attributes.has_key?(:'
|
190
|
+
if attributes.has_key?(:'default')
|
191
191
|
|
192
192
|
|
193
|
-
self.
|
193
|
+
self.default = attributes[:'default']
|
194
194
|
|
195
195
|
|
196
196
|
end
|
197
197
|
|
198
198
|
|
199
|
-
if attributes.has_key?(:'
|
199
|
+
if attributes.has_key?(:'base')
|
200
200
|
|
201
201
|
|
202
|
-
self.
|
202
|
+
self.base = attributes[:'base']
|
203
203
|
|
204
204
|
|
205
205
|
end
|
@@ -349,8 +349,8 @@ module PureCloud
|
|
349
349
|
permission_policies == o.permission_policies &&
|
350
350
|
user_count == o.user_count &&
|
351
351
|
role_needs_update == o.role_needs_update &&
|
352
|
-
base == o.base &&
|
353
352
|
default == o.default &&
|
353
|
+
base == o.base &&
|
354
354
|
self_uri == o.self_uri
|
355
355
|
end
|
356
356
|
|
@@ -363,7 +363,7 @@ module PureCloud
|
|
363
363
|
# Calculates hash code according to all attributes.
|
364
364
|
# @return [Fixnum] Hash code
|
365
365
|
def hash
|
366
|
-
[id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update,
|
366
|
+
[id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update, default, base, self_uri].hash
|
367
367
|
end
|
368
368
|
|
369
369
|
# build the object from hash
|
@@ -37,10 +37,10 @@ module PureCloud
|
|
37
37
|
# Optional unless patch operation.
|
38
38
|
attr_accessor :role_needs_update
|
39
39
|
|
40
|
-
attr_accessor :base
|
41
|
-
|
42
40
|
attr_accessor :default
|
43
41
|
|
42
|
+
attr_accessor :base
|
43
|
+
|
44
44
|
# The URI for this object
|
45
45
|
attr_accessor :self_uri
|
46
46
|
|
@@ -64,10 +64,10 @@ module PureCloud
|
|
64
64
|
|
65
65
|
:'role_needs_update' => :'roleNeedsUpdate',
|
66
66
|
|
67
|
-
:'base' => :'base',
|
68
|
-
|
69
67
|
:'default' => :'default',
|
70
68
|
|
69
|
+
:'base' => :'base',
|
70
|
+
|
71
71
|
:'self_uri' => :'selfUri'
|
72
72
|
|
73
73
|
}
|
@@ -93,10 +93,10 @@ module PureCloud
|
|
93
93
|
|
94
94
|
:'role_needs_update' => :'BOOLEAN',
|
95
95
|
|
96
|
-
:'base' => :'BOOLEAN',
|
97
|
-
|
98
96
|
:'default' => :'BOOLEAN',
|
99
97
|
|
98
|
+
:'base' => :'BOOLEAN',
|
99
|
+
|
100
100
|
:'self_uri' => :'String'
|
101
101
|
|
102
102
|
}
|
@@ -187,19 +187,19 @@ module PureCloud
|
|
187
187
|
end
|
188
188
|
|
189
189
|
|
190
|
-
if attributes.has_key?(:'
|
190
|
+
if attributes.has_key?(:'default')
|
191
191
|
|
192
192
|
|
193
|
-
self.
|
193
|
+
self.default = attributes[:'default']
|
194
194
|
|
195
195
|
|
196
196
|
end
|
197
197
|
|
198
198
|
|
199
|
-
if attributes.has_key?(:'
|
199
|
+
if attributes.has_key?(:'base')
|
200
200
|
|
201
201
|
|
202
|
-
self.
|
202
|
+
self.base = attributes[:'base']
|
203
203
|
|
204
204
|
|
205
205
|
end
|
@@ -349,8 +349,8 @@ module PureCloud
|
|
349
349
|
permission_policies == o.permission_policies &&
|
350
350
|
user_count == o.user_count &&
|
351
351
|
role_needs_update == o.role_needs_update &&
|
352
|
-
base == o.base &&
|
353
352
|
default == o.default &&
|
353
|
+
base == o.base &&
|
354
354
|
self_uri == o.self_uri
|
355
355
|
end
|
356
356
|
|
@@ -363,7 +363,7 @@ module PureCloud
|
|
363
363
|
# Calculates hash code according to all attributes.
|
364
364
|
# @return [Fixnum] Hash code
|
365
365
|
def hash
|
366
|
-
[id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update,
|
366
|
+
[id, name, description, default_role_id, permissions, permission_policies, user_count, role_needs_update, default, base, self_uri].hash
|
367
367
|
end
|
368
368
|
|
369
369
|
# build the object from hash
|
@@ -71,6 +71,9 @@ module PureCloud
|
|
71
71
|
# A globally unique identifier for the stored content of this communication.
|
72
72
|
attr_accessor :message_id
|
73
73
|
|
74
|
+
# A list of uploaded attachments on the email draft.
|
75
|
+
attr_accessor :draft_attachments
|
76
|
+
|
74
77
|
# Attribute mapping from ruby-style variable name to JSON key.
|
75
78
|
def self.attribute_map
|
76
79
|
{
|
@@ -109,7 +112,9 @@ module PureCloud
|
|
109
112
|
|
110
113
|
:'peer_id' => :'peerId',
|
111
114
|
|
112
|
-
:'message_id' => :'messageId'
|
115
|
+
:'message_id' => :'messageId',
|
116
|
+
|
117
|
+
:'draft_attachments' => :'draftAttachments'
|
113
118
|
|
114
119
|
}
|
115
120
|
end
|
@@ -152,7 +157,9 @@ module PureCloud
|
|
152
157
|
|
153
158
|
:'peer_id' => :'String',
|
154
159
|
|
155
|
-
:'message_id' => :'String'
|
160
|
+
:'message_id' => :'String',
|
161
|
+
|
162
|
+
:'draft_attachments' => :'Array<Attachment>'
|
156
163
|
|
157
164
|
}
|
158
165
|
end
|
@@ -330,6 +337,17 @@ module PureCloud
|
|
330
337
|
end
|
331
338
|
|
332
339
|
|
340
|
+
if attributes.has_key?(:'draftAttachments')
|
341
|
+
|
342
|
+
if (value = attributes[:'draftAttachments']).is_a?(Array)
|
343
|
+
self.draft_attachments = value
|
344
|
+
end
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
end
|
349
|
+
|
350
|
+
|
333
351
|
end
|
334
352
|
|
335
353
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -427,6 +445,10 @@ module PureCloud
|
|
427
445
|
|
428
446
|
|
429
447
|
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
430
452
|
|
431
453
|
|
432
454
|
|
@@ -546,6 +568,11 @@ module PureCloud
|
|
546
568
|
|
547
569
|
|
548
570
|
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
549
576
|
|
550
577
|
|
551
578
|
|
@@ -574,7 +601,8 @@ module PureCloud
|
|
574
601
|
provider == o.provider &&
|
575
602
|
script_id == o.script_id &&
|
576
603
|
peer_id == o.peer_id &&
|
577
|
-
message_id == o.message_id
|
604
|
+
message_id == o.message_id &&
|
605
|
+
draft_attachments == o.draft_attachments
|
578
606
|
end
|
579
607
|
|
580
608
|
# @see the `==` method
|
@@ -586,7 +614,7 @@ module PureCloud
|
|
586
614
|
# Calculates hash code according to all attributes.
|
587
615
|
# @return [Fixnum] Hash code
|
588
616
|
def hash
|
589
|
-
[state, id, held, subject, messages_sent, segments, direction, recording_id, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, auto_generated, provider, script_id, peer_id, message_id].hash
|
617
|
+
[state, id, held, subject, messages_sent, segments, direction, recording_id, error_info, disconnect_type, start_hold_time, connected_time, disconnected_time, auto_generated, provider, script_id, peer_id, message_id, draft_attachments].hash
|
590
618
|
end
|
591
619
|
|
592
620
|
# build the object from hash
|
@@ -0,0 +1,326 @@
|
|
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 EmailConversationNotificationAttachment
|
21
|
+
attr_accessor :attachment_id
|
22
|
+
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
attr_accessor :content_uri
|
26
|
+
|
27
|
+
attr_accessor :content_type
|
28
|
+
|
29
|
+
attr_accessor :content_length
|
30
|
+
|
31
|
+
attr_accessor :additional_properties
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
|
37
|
+
:'attachment_id' => :'attachmentId',
|
38
|
+
|
39
|
+
:'name' => :'name',
|
40
|
+
|
41
|
+
:'content_uri' => :'contentUri',
|
42
|
+
|
43
|
+
:'content_type' => :'contentType',
|
44
|
+
|
45
|
+
:'content_length' => :'contentLength',
|
46
|
+
|
47
|
+
:'additional_properties' => :'additionalProperties'
|
48
|
+
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
|
56
|
+
:'attachment_id' => :'String',
|
57
|
+
|
58
|
+
:'name' => :'String',
|
59
|
+
|
60
|
+
:'content_uri' => :'String',
|
61
|
+
|
62
|
+
:'content_type' => :'String',
|
63
|
+
|
64
|
+
:'content_length' => :'Integer',
|
65
|
+
|
66
|
+
:'additional_properties' => :'Object'
|
67
|
+
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
return unless attributes.is_a?(Hash)
|
75
|
+
|
76
|
+
# convert string to symbol for hash key
|
77
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
78
|
+
|
79
|
+
|
80
|
+
if attributes.has_key?(:'attachmentId')
|
81
|
+
|
82
|
+
|
83
|
+
self.attachment_id = attributes[:'attachmentId']
|
84
|
+
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
if attributes.has_key?(:'name')
|
90
|
+
|
91
|
+
|
92
|
+
self.name = attributes[:'name']
|
93
|
+
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
if attributes.has_key?(:'contentUri')
|
99
|
+
|
100
|
+
|
101
|
+
self.content_uri = attributes[:'contentUri']
|
102
|
+
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
if attributes.has_key?(:'contentType')
|
108
|
+
|
109
|
+
|
110
|
+
self.content_type = attributes[:'contentType']
|
111
|
+
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
|
116
|
+
if attributes.has_key?(:'contentLength')
|
117
|
+
|
118
|
+
|
119
|
+
self.content_length = attributes[:'contentLength']
|
120
|
+
|
121
|
+
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
if attributes.has_key?(:'additionalProperties')
|
126
|
+
|
127
|
+
|
128
|
+
self.additional_properties = attributes[:'additionalProperties']
|
129
|
+
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
137
|
+
# @return Array for valid properies with the reasons
|
138
|
+
def list_invalid_properties
|
139
|
+
invalid_properties = Array.new
|
140
|
+
|
141
|
+
|
142
|
+
return invalid_properties
|
143
|
+
end
|
144
|
+
|
145
|
+
# Check to see if the all the properties in the model are valid
|
146
|
+
# @return true if the model is valid
|
147
|
+
def valid?
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
# Checks equality by comparing each attribute.
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def ==(o)
|
209
|
+
return true if self.equal?(o)
|
210
|
+
self.class == o.class &&
|
211
|
+
attachment_id == o.attachment_id &&
|
212
|
+
name == o.name &&
|
213
|
+
content_uri == o.content_uri &&
|
214
|
+
content_type == o.content_type &&
|
215
|
+
content_length == o.content_length &&
|
216
|
+
additional_properties == o.additional_properties
|
217
|
+
end
|
218
|
+
|
219
|
+
# @see the `==` method
|
220
|
+
# @param [Object] Object to be compared
|
221
|
+
def eql?(o)
|
222
|
+
self == o
|
223
|
+
end
|
224
|
+
|
225
|
+
# Calculates hash code according to all attributes.
|
226
|
+
# @return [Fixnum] Hash code
|
227
|
+
def hash
|
228
|
+
[attachment_id, name, content_uri, content_type, content_length, additional_properties].hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# build the object from hash
|
232
|
+
def build_from_hash(attributes)
|
233
|
+
return nil unless attributes.is_a?(Hash)
|
234
|
+
self.class.swagger_types.each_pair do |key, type|
|
235
|
+
if type =~ /^Array<(.*)>/i
|
236
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
237
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
238
|
+
else
|
239
|
+
#TODO show warning in debug mode
|
240
|
+
end
|
241
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
242
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
243
|
+
else
|
244
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
self
|
249
|
+
end
|
250
|
+
|
251
|
+
def _deserialize(type, value)
|
252
|
+
case type.to_sym
|
253
|
+
when :DateTime
|
254
|
+
DateTime.parse(value)
|
255
|
+
when :Date
|
256
|
+
Date.parse(value)
|
257
|
+
when :String
|
258
|
+
value.to_s
|
259
|
+
when :Integer
|
260
|
+
value.to_i
|
261
|
+
when :Float
|
262
|
+
value.to_f
|
263
|
+
when :BOOLEAN
|
264
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
265
|
+
true
|
266
|
+
else
|
267
|
+
false
|
268
|
+
end
|
269
|
+
when :Object
|
270
|
+
# generic object (usually a Hash), return directly
|
271
|
+
value
|
272
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
273
|
+
inner_type = Regexp.last_match[:inner_type]
|
274
|
+
value.map { |v| _deserialize(inner_type, v) }
|
275
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
276
|
+
k_type = Regexp.last_match[:k_type]
|
277
|
+
v_type = Regexp.last_match[:v_type]
|
278
|
+
{}.tap do |hash|
|
279
|
+
value.each do |k, v|
|
280
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
281
|
+
end
|
282
|
+
end
|
283
|
+
else # model
|
284
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
285
|
+
_model.build_from_hash(value)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
def to_s
|
290
|
+
to_hash.to_s
|
291
|
+
end
|
292
|
+
|
293
|
+
# to_body is an alias to to_body (backward compatibility))
|
294
|
+
def to_body
|
295
|
+
to_hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# return the object in the form of hash
|
299
|
+
def to_hash
|
300
|
+
hash = {}
|
301
|
+
self.class.attribute_map.each_pair do |attr, param|
|
302
|
+
value = self.send(attr)
|
303
|
+
next if value.nil?
|
304
|
+
hash[param] = _to_hash(value)
|
305
|
+
end
|
306
|
+
hash
|
307
|
+
end
|
308
|
+
|
309
|
+
# Method to output non-array value in the form of hash
|
310
|
+
# For object, use to_hash. Otherwise, just return the value
|
311
|
+
def _to_hash(value)
|
312
|
+
if value.is_a?(Array)
|
313
|
+
value.compact.map{ |v| _to_hash(v) }
|
314
|
+
elsif value.is_a?(Hash)
|
315
|
+
{}.tap do |hash|
|
316
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
317
|
+
end
|
318
|
+
elsif value.respond_to? :to_hash
|
319
|
+
value.to_hash
|
320
|
+
else
|
321
|
+
value
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
end
|
326
|
+
end
|