purecloudplatformclientv2 87.0.0 → 92.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 +5 -5
- data/docs/AmazonLexRequest.md +14 -0
- data/docs/AnalyticsEvaluation.md +1 -1
- data/docs/ApiUsageQuery.md +16 -0
- data/docs/ApiUsageQueryResult.md +14 -0
- data/docs/ApiUsageRow.md +25 -0
- data/docs/ArchitectApi.md +132 -0
- data/docs/AuditApi.md +130 -0
- data/docs/AuditQueryEntity.md +14 -0
- data/docs/AuditQueryExecutionStatusResponse.md +1 -0
- data/docs/AuditQueryRequest.md +1 -0
- data/docs/AuditQueryService.md +14 -0
- data/docs/AuditQueryServiceMapping.md +13 -0
- data/docs/AuditQuerySort.md +14 -0
- data/docs/AuditRealtimeQueryRequest.md +18 -0
- data/docs/AuditRealtimeQueryResultsResponse.md +17 -0
- data/docs/BuAgentScheduleActivity.md +2 -0
- data/docs/BuRescheduleRequest.md +2 -2
- data/docs/ButtonComponent.md +16 -0
- data/docs/CoachingApi.md +1 -1
- data/docs/ContentActions.md +17 -0
- data/docs/ContentAttachment.md +19 -0
- data/docs/ContentGeneric.md +19 -0
- data/docs/ContentList.md +19 -0
- data/docs/ContentLocation.md +17 -0
- data/docs/ContentNotificationTemplate.md +17 -0
- data/docs/ContentQuickReply.md +16 -0
- data/docs/ConversationAggregationQuery.md +1 -1
- data/docs/CreateQueueRequest.md +1 -0
- data/docs/EdgeGroup.md +1 -0
- data/docs/EntityListing.md +1 -5
- data/docs/EvaluationAggregationQuery.md +1 -1
- data/docs/ExternalContact.md +2 -0
- data/docs/ExternalOrganization.md +2 -0
- data/docs/FlowAggregationQuery.md +1 -1
- data/docs/FlowExecutionLaunchRequest.md +16 -0
- data/docs/FlowExecutionLaunchResponse.md +16 -0
- data/docs/FlowRuntimeExecution.md +23 -0
- data/docs/GenericSAML.md +22 -0
- data/docs/GoogleDialogflowCustomSettings.md +13 -0
- data/docs/GroupsApi.md +4 -4
- data/docs/IdentityProviderApi.md +187 -0
- data/docs/IpAddressAuthentication.md +13 -0
- data/docs/KnowledgeSearchResponse.md +1 -1
- data/docs/LanguageUnderstandingApi.md +164 -30
- data/docs/ListItemComponent.md +19 -0
- data/docs/MessageContent.md +19 -0
- data/docs/NluDomainVersion.md +3 -1
- data/docs/NotificationTemplateBody.md +14 -0
- data/docs/NotificationTemplateFooter.md +13 -0
- data/docs/NotificationTemplateHeader.md +16 -0
- data/docs/NotificationTemplateParameter.md +14 -0
- data/docs/OAuthApi.md +208 -0
- data/docs/OrganizationApi.md +126 -0
- data/docs/PostTextMessage.md +15 -0
- data/docs/PostTextRequest.md +23 -0
- data/docs/PostTextResponse.md +20 -0
- data/docs/Prompt.md +2 -2
- data/docs/Queue.md +1 -0
- data/docs/QueueRequest.md +1 -0
- data/docs/RecordingApi.md +12 -0
- data/docs/ReportingDataExportTopicDataExportNotification.md +1 -0
- data/docs/ScimEmail.md +1 -1
- data/docs/SurveyAggregationQuery.md +1 -1
- data/docs/SurveyForm.md +0 -2
- data/docs/TextbotsApi.md +78 -0
- data/docs/UploadUrlRequest.md +1 -0
- data/docs/UsageApi.md +144 -0
- data/docs/UsageExecutionResult.md +14 -0
- data/docs/UserAggregationQuery.md +1 -1
- data/docs/UserQueue.md +1 -0
- data/docs/UsersApi.md +5 -5
- data/docs/ViewFilter.md +2 -0
- data/docs/VoicemailMessagesTopicOwner.md +13 -0
- data/docs/VoicemailMessagesTopicVoicemailCopyRecord.md +14 -0
- data/docs/VoicemailMessagesTopicVoicemailMessage.md +2 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuForecastModification.md +23 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecast.md +24 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecastNotification.md +15 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicForecastSourceDayPointer.md +17 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicModificationIntervalOffsetValue.md +14 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicUserReference.md +13 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicWfmVersionedEntityMetadata.md +15 -0
- data/docs/WorkforceManagementApi.md +3 -3
- data/lib/purecloudplatformclientv2.rb +45 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +130 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +129 -0
- data/lib/purecloudplatformclientv2/api/groups_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/identity_provider_api.rb +175 -0
- data/lib/purecloudplatformclientv2/api/language_understanding_api.rb +189 -30
- data/lib/purecloudplatformclientv2/api/o_auth_api.rb +224 -0
- data/lib/purecloudplatformclientv2/api/organization_api.rb +120 -0
- data/lib/purecloudplatformclientv2/api/recording_api.rb +78 -0
- data/lib/purecloudplatformclientv2/api/textbots_api.rb +92 -0
- data/lib/purecloudplatformclientv2/api/usage_api.rb +157 -0
- data/lib/purecloudplatformclientv2/api/users_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/amazon_lex_request.rb +232 -0
- data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
- data/lib/purecloudplatformclientv2/models/api_usage_query.rb +303 -0
- data/lib/purecloudplatformclientv2/models/api_usage_query_result.rb +244 -0
- data/lib/purecloudplatformclientv2/models/api_usage_row.rb +514 -0
- data/lib/purecloudplatformclientv2/models/audit_log_message.rb +6 -6
- data/lib/purecloudplatformclientv2/models/audit_query_entity.rb +244 -0
- data/lib/purecloudplatformclientv2/models/audit_query_execution_status_response.rb +34 -6
- data/lib/purecloudplatformclientv2/models/audit_query_request.rb +34 -6
- data/lib/purecloudplatformclientv2/models/audit_query_service.rb +244 -0
- data/lib/purecloudplatformclientv2/models/audit_query_service_mapping.rb +204 -0
- data/lib/purecloudplatformclientv2/models/audit_query_sort.rb +266 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +360 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_results_response.rb +303 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +70 -4
- data/lib/purecloudplatformclientv2/models/bu_reschedule_request.rb +2 -12
- data/lib/purecloudplatformclientv2/models/button_component.rb +281 -0
- data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/coaching_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/models/content_actions.rb +309 -0
- data/lib/purecloudplatformclientv2/models/content_attachment.rb +378 -0
- data/lib/purecloudplatformclientv2/models/content_generic.rb +361 -0
- data/lib/purecloudplatformclientv2/models/content_list.rb +375 -0
- data/lib/purecloudplatformclientv2/models/content_location.rb +307 -0
- data/lib/purecloudplatformclientv2/models/content_notification_template.rb +312 -0
- data/lib/purecloudplatformclientv2/models/content_quick_reply.rb +300 -0
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_queue_request.rb +29 -1
- data/lib/purecloudplatformclientv2/models/edge_group.rb +27 -1
- data/lib/purecloudplatformclientv2/models/entity_listing.rb +4 -104
- data/lib/purecloudplatformclientv2/models/evaluation_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/external_contact.rb +55 -1
- data/lib/purecloudplatformclientv2/models/external_organization.rb +55 -1
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/flow_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/flow_execution_launch_request.rb +288 -0
- data/lib/purecloudplatformclientv2/models/flow_execution_launch_response.rb +281 -0
- data/lib/purecloudplatformclientv2/models/flow_runtime_execution.rb +494 -0
- data/lib/purecloudplatformclientv2/models/generic_saml.rb +428 -0
- data/lib/purecloudplatformclientv2/models/google_dialogflow_custom_settings.rb +202 -0
- data/lib/purecloudplatformclientv2/models/ip_address_authentication.rb +203 -0
- data/lib/purecloudplatformclientv2/models/knowledge_search_response.rb +18 -18
- data/lib/purecloudplatformclientv2/models/list_item_component.rb +373 -0
- data/lib/purecloudplatformclientv2/models/message_content.rb +378 -0
- data/lib/purecloudplatformclientv2/models/nlu_domain_version.rb +72 -1
- data/lib/purecloudplatformclientv2/models/notification_template_body.rb +236 -0
- data/lib/purecloudplatformclientv2/models/notification_template_footer.rb +203 -0
- data/lib/purecloudplatformclientv2/models/notification_template_header.rb +302 -0
- data/lib/purecloudplatformclientv2/models/notification_template_parameter.rb +234 -0
- data/lib/purecloudplatformclientv2/models/post_text_message.rb +275 -0
- data/lib/purecloudplatformclientv2/models/post_text_request.rb +482 -0
- data/lib/purecloudplatformclientv2/models/post_text_response.rb +413 -0
- data/lib/purecloudplatformclientv2/models/prompt.rb +2 -0
- data/lib/purecloudplatformclientv2/models/prompt_asset.rb +15 -1
- data/lib/purecloudplatformclientv2/models/prompt_asset_create.rb +15 -1
- data/lib/purecloudplatformclientv2/models/queue.rb +29 -1
- data/lib/purecloudplatformclientv2/models/queue_request.rb +29 -1
- data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +31 -4
- data/lib/purecloudplatformclientv2/models/scim_email.rb +1 -1
- data/lib/purecloudplatformclientv2/models/survey_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/survey_form.rb +1 -53
- data/lib/purecloudplatformclientv2/models/upload_url_request.rb +43 -4
- data/lib/purecloudplatformclientv2/models/usage_execution_result.rb +228 -0
- data/lib/purecloudplatformclientv2/models/user_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/user_queue.rb +29 -1
- data/lib/purecloudplatformclientv2/models/view_filter.rb +58 -4
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_owner.rb +201 -0
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_copy_record.rb +226 -0
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_message.rb +56 -4
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_forecast_modification.rb +497 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast.rb +494 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast_notification.rb +265 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_forecast_source_day_pointer.rb +315 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_modification_interval_offset_value.rb +226 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_user_reference.rb +201 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_wfm_versioned_entity_metadata.rb +251 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +92 -2
@@ -272,7 +272,7 @@ module PureCloud
|
|
272
272
|
|
273
273
|
|
274
274
|
|
275
|
-
allowed_values = ["Scheduled", "InProgress", "Completed"]
|
275
|
+
allowed_values = ["Scheduled", "InProgress", "Completed", "InvalidSchedule"]
|
276
276
|
if @status && !allowed_values.include?(@status)
|
277
277
|
return false
|
278
278
|
end
|
@@ -351,7 +351,7 @@ module PureCloud
|
|
351
351
|
# Custom attribute writer method checking allowed values (enum).
|
352
352
|
# @param [Object] status Object to be assigned
|
353
353
|
def status=(status)
|
354
|
-
allowed_values = ["Scheduled", "InProgress", "Completed"]
|
354
|
+
allowed_values = ["Scheduled", "InProgress", "Completed", "InvalidSchedule"]
|
355
355
|
if status && !allowed_values.include?(status)
|
356
356
|
fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
|
357
357
|
end
|
@@ -0,0 +1,309 @@
|
|
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
|
+
# User actions available on the content. All actions are optional and all actions are executed simultaneously.
|
21
|
+
class ContentActions
|
22
|
+
# A URL for a web page to redirect the user to
|
23
|
+
attr_accessor :url
|
24
|
+
|
25
|
+
# The target window or tab within the URL's web page. If empty will open a blank page or tab.
|
26
|
+
attr_accessor :url_target
|
27
|
+
|
28
|
+
# Text to be sent back in reply when a list item is selected
|
29
|
+
attr_accessor :textback
|
30
|
+
|
31
|
+
# Execute an organization's specific command
|
32
|
+
attr_accessor :command_name
|
33
|
+
|
34
|
+
# Additional context for the command
|
35
|
+
attr_accessor :context
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
|
41
|
+
:'url' => :'url',
|
42
|
+
|
43
|
+
:'url_target' => :'urlTarget',
|
44
|
+
|
45
|
+
:'textback' => :'textback',
|
46
|
+
|
47
|
+
:'command_name' => :'commandName',
|
48
|
+
|
49
|
+
:'context' => :'context'
|
50
|
+
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
|
58
|
+
:'url' => :'String',
|
59
|
+
|
60
|
+
:'url_target' => :'String',
|
61
|
+
|
62
|
+
:'textback' => :'String',
|
63
|
+
|
64
|
+
:'command_name' => :'String',
|
65
|
+
|
66
|
+
:'context' => :'Hash<String, 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?(:'url')
|
81
|
+
|
82
|
+
|
83
|
+
self.url = attributes[:'url']
|
84
|
+
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
if attributes.has_key?(:'urlTarget')
|
90
|
+
|
91
|
+
|
92
|
+
self.url_target = attributes[:'urlTarget']
|
93
|
+
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
if attributes.has_key?(:'textback')
|
99
|
+
|
100
|
+
|
101
|
+
self.textback = attributes[:'textback']
|
102
|
+
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
if attributes.has_key?(:'commandName')
|
108
|
+
|
109
|
+
|
110
|
+
self.command_name = attributes[:'commandName']
|
111
|
+
|
112
|
+
|
113
|
+
end
|
114
|
+
|
115
|
+
|
116
|
+
if attributes.has_key?(:'context')
|
117
|
+
|
118
|
+
if (value = attributes[:'context']).is_a?(Array)
|
119
|
+
self.context = value
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
130
|
+
# @return Array for valid properies with the reasons
|
131
|
+
def list_invalid_properties
|
132
|
+
invalid_properties = Array.new
|
133
|
+
|
134
|
+
|
135
|
+
return invalid_properties
|
136
|
+
end
|
137
|
+
|
138
|
+
# Check to see if the all the properties in the model are valid
|
139
|
+
# @return true if the model is valid
|
140
|
+
def valid?
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
# Checks equality by comparing each attribute.
|
191
|
+
# @param [Object] Object to be compared
|
192
|
+
def ==(o)
|
193
|
+
return true if self.equal?(o)
|
194
|
+
self.class == o.class &&
|
195
|
+
url == o.url &&
|
196
|
+
url_target == o.url_target &&
|
197
|
+
textback == o.textback &&
|
198
|
+
command_name == o.command_name &&
|
199
|
+
context == o.context
|
200
|
+
end
|
201
|
+
|
202
|
+
# @see the `==` method
|
203
|
+
# @param [Object] Object to be compared
|
204
|
+
def eql?(o)
|
205
|
+
self == o
|
206
|
+
end
|
207
|
+
|
208
|
+
# Calculates hash code according to all attributes.
|
209
|
+
# @return [Fixnum] Hash code
|
210
|
+
def hash
|
211
|
+
[url, url_target, textback, command_name, context].hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# build the object from hash
|
215
|
+
def build_from_hash(attributes)
|
216
|
+
return nil unless attributes.is_a?(Hash)
|
217
|
+
self.class.swagger_types.each_pair do |key, type|
|
218
|
+
if type =~ /^Array<(.*)>/i
|
219
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
220
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
221
|
+
else
|
222
|
+
#TODO show warning in debug mode
|
223
|
+
end
|
224
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
225
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
226
|
+
else
|
227
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
self
|
232
|
+
end
|
233
|
+
|
234
|
+
def _deserialize(type, value)
|
235
|
+
case type.to_sym
|
236
|
+
when :DateTime
|
237
|
+
DateTime.parse(value)
|
238
|
+
when :Date
|
239
|
+
Date.parse(value)
|
240
|
+
when :String
|
241
|
+
value.to_s
|
242
|
+
when :Integer
|
243
|
+
value.to_i
|
244
|
+
when :Float
|
245
|
+
value.to_f
|
246
|
+
when :BOOLEAN
|
247
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
248
|
+
true
|
249
|
+
else
|
250
|
+
false
|
251
|
+
end
|
252
|
+
when :Object
|
253
|
+
# generic object (usually a Hash), return directly
|
254
|
+
value
|
255
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
256
|
+
inner_type = Regexp.last_match[:inner_type]
|
257
|
+
value.map { |v| _deserialize(inner_type, v) }
|
258
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
259
|
+
k_type = Regexp.last_match[:k_type]
|
260
|
+
v_type = Regexp.last_match[:v_type]
|
261
|
+
{}.tap do |hash|
|
262
|
+
value.each do |k, v|
|
263
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
else # model
|
267
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
268
|
+
_model.build_from_hash(value)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
def to_s
|
273
|
+
to_hash.to_s
|
274
|
+
end
|
275
|
+
|
276
|
+
# to_body is an alias to to_body (backward compatibility))
|
277
|
+
def to_body
|
278
|
+
to_hash
|
279
|
+
end
|
280
|
+
|
281
|
+
# return the object in the form of hash
|
282
|
+
def to_hash
|
283
|
+
hash = {}
|
284
|
+
self.class.attribute_map.each_pair do |attr, param|
|
285
|
+
value = self.send(attr)
|
286
|
+
next if value.nil?
|
287
|
+
hash[param] = _to_hash(value)
|
288
|
+
end
|
289
|
+
hash
|
290
|
+
end
|
291
|
+
|
292
|
+
# Method to output non-array value in the form of hash
|
293
|
+
# For object, use to_hash. Otherwise, just return the value
|
294
|
+
def _to_hash(value)
|
295
|
+
if value.is_a?(Array)
|
296
|
+
value.compact.map{ |v| _to_hash(v) }
|
297
|
+
elsif value.is_a?(Hash)
|
298
|
+
{}.tap do |hash|
|
299
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
300
|
+
end
|
301
|
+
elsif value.respond_to? :to_hash
|
302
|
+
value.to_hash
|
303
|
+
else
|
304
|
+
value
|
305
|
+
end
|
306
|
+
end
|
307
|
+
|
308
|
+
end
|
309
|
+
end
|
@@ -0,0 +1,378 @@
|
|
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
|
+
# Attachment object
|
21
|
+
class ContentAttachment
|
22
|
+
# Vendor specific ID for media. For example, a LINE sticker ID
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
# The type of media this instance represents
|
26
|
+
attr_accessor :media_type
|
27
|
+
|
28
|
+
# Content element url
|
29
|
+
attr_accessor :url
|
30
|
+
|
31
|
+
# Content mime type from https://www.iana.org/assignments/media-types/media-types.xhtml
|
32
|
+
attr_accessor :mime
|
33
|
+
|
34
|
+
# Text message associated with media element: e.g. caption in case of image.
|
35
|
+
attr_accessor :text
|
36
|
+
|
37
|
+
# Secure hash of the media content
|
38
|
+
attr_accessor :sha256
|
39
|
+
|
40
|
+
# Suggested file name for media file
|
41
|
+
attr_accessor :filename
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
|
47
|
+
:'id' => :'id',
|
48
|
+
|
49
|
+
:'media_type' => :'mediaType',
|
50
|
+
|
51
|
+
:'url' => :'url',
|
52
|
+
|
53
|
+
:'mime' => :'mime',
|
54
|
+
|
55
|
+
:'text' => :'text',
|
56
|
+
|
57
|
+
:'sha256' => :'sha256',
|
58
|
+
|
59
|
+
:'filename' => :'filename'
|
60
|
+
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
{
|
67
|
+
|
68
|
+
:'id' => :'String',
|
69
|
+
|
70
|
+
:'media_type' => :'String',
|
71
|
+
|
72
|
+
:'url' => :'String',
|
73
|
+
|
74
|
+
:'mime' => :'String',
|
75
|
+
|
76
|
+
:'text' => :'String',
|
77
|
+
|
78
|
+
:'sha256' => :'String',
|
79
|
+
|
80
|
+
:'filename' => :'String'
|
81
|
+
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# Initializes the object
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
def initialize(attributes = {})
|
88
|
+
return unless attributes.is_a?(Hash)
|
89
|
+
|
90
|
+
# convert string to symbol for hash key
|
91
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
92
|
+
|
93
|
+
|
94
|
+
if attributes.has_key?(:'id')
|
95
|
+
|
96
|
+
|
97
|
+
self.id = attributes[:'id']
|
98
|
+
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
if attributes.has_key?(:'mediaType')
|
104
|
+
|
105
|
+
|
106
|
+
self.media_type = attributes[:'mediaType']
|
107
|
+
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
if attributes.has_key?(:'url')
|
113
|
+
|
114
|
+
|
115
|
+
self.url = attributes[:'url']
|
116
|
+
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
if attributes.has_key?(:'mime')
|
122
|
+
|
123
|
+
|
124
|
+
self.mime = attributes[:'mime']
|
125
|
+
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
if attributes.has_key?(:'text')
|
131
|
+
|
132
|
+
|
133
|
+
self.text = attributes[:'text']
|
134
|
+
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
if attributes.has_key?(:'sha256')
|
140
|
+
|
141
|
+
|
142
|
+
self.sha256 = attributes[:'sha256']
|
143
|
+
|
144
|
+
|
145
|
+
end
|
146
|
+
|
147
|
+
|
148
|
+
if attributes.has_key?(:'filename')
|
149
|
+
|
150
|
+
|
151
|
+
self.filename = attributes[:'filename']
|
152
|
+
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
160
|
+
# @return Array for valid properies with the reasons
|
161
|
+
def list_invalid_properties
|
162
|
+
invalid_properties = Array.new
|
163
|
+
|
164
|
+
|
165
|
+
return invalid_properties
|
166
|
+
end
|
167
|
+
|
168
|
+
# Check to see if the all the properties in the model are valid
|
169
|
+
# @return true if the model is valid
|
170
|
+
def valid?
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
if @media_type.nil?
|
178
|
+
return false
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
allowed_values = ["Image", "Video", "Audio", "File"]
|
184
|
+
if @media_type && !allowed_values.include?(@media_type)
|
185
|
+
return false
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
end
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
# Custom attribute writer method checking allowed values (enum).
|
220
|
+
# @param [Object] media_type Object to be assigned
|
221
|
+
def media_type=(media_type)
|
222
|
+
allowed_values = ["Image", "Video", "Audio", "File"]
|
223
|
+
if media_type && !allowed_values.include?(media_type)
|
224
|
+
fail ArgumentError, "invalid value for 'media_type', must be one of #{allowed_values}."
|
225
|
+
end
|
226
|
+
@media_type = media_type
|
227
|
+
end
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
# Checks equality by comparing each attribute.
|
258
|
+
# @param [Object] Object to be compared
|
259
|
+
def ==(o)
|
260
|
+
return true if self.equal?(o)
|
261
|
+
self.class == o.class &&
|
262
|
+
id == o.id &&
|
263
|
+
media_type == o.media_type &&
|
264
|
+
url == o.url &&
|
265
|
+
mime == o.mime &&
|
266
|
+
text == o.text &&
|
267
|
+
sha256 == o.sha256 &&
|
268
|
+
filename == o.filename
|
269
|
+
end
|
270
|
+
|
271
|
+
# @see the `==` method
|
272
|
+
# @param [Object] Object to be compared
|
273
|
+
def eql?(o)
|
274
|
+
self == o
|
275
|
+
end
|
276
|
+
|
277
|
+
# Calculates hash code according to all attributes.
|
278
|
+
# @return [Fixnum] Hash code
|
279
|
+
def hash
|
280
|
+
[id, media_type, url, mime, text, sha256, filename].hash
|
281
|
+
end
|
282
|
+
|
283
|
+
# build the object from hash
|
284
|
+
def build_from_hash(attributes)
|
285
|
+
return nil unless attributes.is_a?(Hash)
|
286
|
+
self.class.swagger_types.each_pair do |key, type|
|
287
|
+
if type =~ /^Array<(.*)>/i
|
288
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
289
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
290
|
+
else
|
291
|
+
#TODO show warning in debug mode
|
292
|
+
end
|
293
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
294
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
295
|
+
else
|
296
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
self
|
301
|
+
end
|
302
|
+
|
303
|
+
def _deserialize(type, value)
|
304
|
+
case type.to_sym
|
305
|
+
when :DateTime
|
306
|
+
DateTime.parse(value)
|
307
|
+
when :Date
|
308
|
+
Date.parse(value)
|
309
|
+
when :String
|
310
|
+
value.to_s
|
311
|
+
when :Integer
|
312
|
+
value.to_i
|
313
|
+
when :Float
|
314
|
+
value.to_f
|
315
|
+
when :BOOLEAN
|
316
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
317
|
+
true
|
318
|
+
else
|
319
|
+
false
|
320
|
+
end
|
321
|
+
when :Object
|
322
|
+
# generic object (usually a Hash), return directly
|
323
|
+
value
|
324
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
325
|
+
inner_type = Regexp.last_match[:inner_type]
|
326
|
+
value.map { |v| _deserialize(inner_type, v) }
|
327
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
328
|
+
k_type = Regexp.last_match[:k_type]
|
329
|
+
v_type = Regexp.last_match[:v_type]
|
330
|
+
{}.tap do |hash|
|
331
|
+
value.each do |k, v|
|
332
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
else # model
|
336
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
337
|
+
_model.build_from_hash(value)
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
def to_s
|
342
|
+
to_hash.to_s
|
343
|
+
end
|
344
|
+
|
345
|
+
# to_body is an alias to to_body (backward compatibility))
|
346
|
+
def to_body
|
347
|
+
to_hash
|
348
|
+
end
|
349
|
+
|
350
|
+
# return the object in the form of hash
|
351
|
+
def to_hash
|
352
|
+
hash = {}
|
353
|
+
self.class.attribute_map.each_pair do |attr, param|
|
354
|
+
value = self.send(attr)
|
355
|
+
next if value.nil?
|
356
|
+
hash[param] = _to_hash(value)
|
357
|
+
end
|
358
|
+
hash
|
359
|
+
end
|
360
|
+
|
361
|
+
# Method to output non-array value in the form of hash
|
362
|
+
# For object, use to_hash. Otherwise, just return the value
|
363
|
+
def _to_hash(value)
|
364
|
+
if value.is_a?(Array)
|
365
|
+
value.compact.map{ |v| _to_hash(v) }
|
366
|
+
elsif value.is_a?(Hash)
|
367
|
+
{}.tap do |hash|
|
368
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
369
|
+
end
|
370
|
+
elsif value.respond_to? :to_hash
|
371
|
+
value.to_hash
|
372
|
+
else
|
373
|
+
value
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
end
|
378
|
+
end
|