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
@@ -0,0 +1,482 @@
|
|
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
|
+
class PostTextRequest
|
21
|
+
# ID of the bot to send the text to.
|
22
|
+
attr_accessor :bot_id
|
23
|
+
|
24
|
+
# Alias/Version of the bot
|
25
|
+
attr_accessor :bot_alias
|
26
|
+
|
27
|
+
# the integration service id for the bot's credentials
|
28
|
+
attr_accessor :integration_id
|
29
|
+
|
30
|
+
# GUID for this bot's session
|
31
|
+
attr_accessor :bot_session_id
|
32
|
+
|
33
|
+
# Message to send to the bot
|
34
|
+
attr_accessor :post_text_message
|
35
|
+
|
36
|
+
# The launguage code the bot will run under
|
37
|
+
attr_accessor :language_code
|
38
|
+
|
39
|
+
# Override timeout for the bot session. This should be greater than 10 minutes.
|
40
|
+
attr_accessor :bot_session_timeout_minutes
|
41
|
+
|
42
|
+
# The channels this bot is utilizing
|
43
|
+
attr_accessor :bot_channels
|
44
|
+
|
45
|
+
# Id for tracking the activity - this will be returned in the response
|
46
|
+
attr_accessor :bot_correlation_id
|
47
|
+
|
48
|
+
attr_accessor :amazon_lex_request
|
49
|
+
|
50
|
+
attr_accessor :google_dialogflow
|
51
|
+
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
|
56
|
+
:'bot_id' => :'botId',
|
57
|
+
|
58
|
+
:'bot_alias' => :'botAlias',
|
59
|
+
|
60
|
+
:'integration_id' => :'integrationId',
|
61
|
+
|
62
|
+
:'bot_session_id' => :'botSessionId',
|
63
|
+
|
64
|
+
:'post_text_message' => :'postTextMessage',
|
65
|
+
|
66
|
+
:'language_code' => :'languageCode',
|
67
|
+
|
68
|
+
:'bot_session_timeout_minutes' => :'botSessionTimeoutMinutes',
|
69
|
+
|
70
|
+
:'bot_channels' => :'botChannels',
|
71
|
+
|
72
|
+
:'bot_correlation_id' => :'botCorrelationId',
|
73
|
+
|
74
|
+
:'amazon_lex_request' => :'amazonLexRequest',
|
75
|
+
|
76
|
+
:'google_dialogflow' => :'googleDialogflow'
|
77
|
+
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute type mapping.
|
82
|
+
def self.swagger_types
|
83
|
+
{
|
84
|
+
|
85
|
+
:'bot_id' => :'String',
|
86
|
+
|
87
|
+
:'bot_alias' => :'String',
|
88
|
+
|
89
|
+
:'integration_id' => :'String',
|
90
|
+
|
91
|
+
:'bot_session_id' => :'String',
|
92
|
+
|
93
|
+
:'post_text_message' => :'PostTextMessage',
|
94
|
+
|
95
|
+
:'language_code' => :'String',
|
96
|
+
|
97
|
+
:'bot_session_timeout_minutes' => :'Integer',
|
98
|
+
|
99
|
+
:'bot_channels' => :'Array<String>',
|
100
|
+
|
101
|
+
:'bot_correlation_id' => :'String',
|
102
|
+
|
103
|
+
:'amazon_lex_request' => :'AmazonLexRequest',
|
104
|
+
|
105
|
+
:'google_dialogflow' => :'GoogleDialogflowCustomSettings'
|
106
|
+
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
# Initializes the object
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
def initialize(attributes = {})
|
113
|
+
return unless attributes.is_a?(Hash)
|
114
|
+
|
115
|
+
# convert string to symbol for hash key
|
116
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
117
|
+
|
118
|
+
|
119
|
+
if attributes.has_key?(:'botId')
|
120
|
+
|
121
|
+
|
122
|
+
self.bot_id = attributes[:'botId']
|
123
|
+
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
if attributes.has_key?(:'botAlias')
|
129
|
+
|
130
|
+
|
131
|
+
self.bot_alias = attributes[:'botAlias']
|
132
|
+
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
if attributes.has_key?(:'integrationId')
|
138
|
+
|
139
|
+
|
140
|
+
self.integration_id = attributes[:'integrationId']
|
141
|
+
|
142
|
+
|
143
|
+
end
|
144
|
+
|
145
|
+
|
146
|
+
if attributes.has_key?(:'botSessionId')
|
147
|
+
|
148
|
+
|
149
|
+
self.bot_session_id = attributes[:'botSessionId']
|
150
|
+
|
151
|
+
|
152
|
+
end
|
153
|
+
|
154
|
+
|
155
|
+
if attributes.has_key?(:'postTextMessage')
|
156
|
+
|
157
|
+
|
158
|
+
self.post_text_message = attributes[:'postTextMessage']
|
159
|
+
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
if attributes.has_key?(:'languageCode')
|
165
|
+
|
166
|
+
|
167
|
+
self.language_code = attributes[:'languageCode']
|
168
|
+
|
169
|
+
|
170
|
+
end
|
171
|
+
|
172
|
+
|
173
|
+
if attributes.has_key?(:'botSessionTimeoutMinutes')
|
174
|
+
|
175
|
+
|
176
|
+
self.bot_session_timeout_minutes = attributes[:'botSessionTimeoutMinutes']
|
177
|
+
|
178
|
+
|
179
|
+
end
|
180
|
+
|
181
|
+
|
182
|
+
if attributes.has_key?(:'botChannels')
|
183
|
+
|
184
|
+
if (value = attributes[:'botChannels']).is_a?(Array)
|
185
|
+
self.bot_channels = value
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
end
|
191
|
+
|
192
|
+
|
193
|
+
if attributes.has_key?(:'botCorrelationId')
|
194
|
+
|
195
|
+
|
196
|
+
self.bot_correlation_id = attributes[:'botCorrelationId']
|
197
|
+
|
198
|
+
|
199
|
+
end
|
200
|
+
|
201
|
+
|
202
|
+
if attributes.has_key?(:'amazonLexRequest')
|
203
|
+
|
204
|
+
|
205
|
+
self.amazon_lex_request = attributes[:'amazonLexRequest']
|
206
|
+
|
207
|
+
|
208
|
+
end
|
209
|
+
|
210
|
+
|
211
|
+
if attributes.has_key?(:'googleDialogflow')
|
212
|
+
|
213
|
+
|
214
|
+
self.google_dialogflow = attributes[:'googleDialogflow']
|
215
|
+
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
223
|
+
# @return Array for valid properies with the reasons
|
224
|
+
def list_invalid_properties
|
225
|
+
invalid_properties = Array.new
|
226
|
+
|
227
|
+
|
228
|
+
return invalid_properties
|
229
|
+
end
|
230
|
+
|
231
|
+
# Check to see if the all the properties in the model are valid
|
232
|
+
# @return true if the model is valid
|
233
|
+
def valid?
|
234
|
+
|
235
|
+
|
236
|
+
if @bot_id.nil?
|
237
|
+
return false
|
238
|
+
end
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
if @integration_id.nil?
|
250
|
+
return false
|
251
|
+
end
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
if @bot_session_id.nil?
|
259
|
+
return false
|
260
|
+
end
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
if @post_text_message.nil?
|
268
|
+
return false
|
269
|
+
end
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
end
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
# Checks equality by comparing each attribute.
|
358
|
+
# @param [Object] Object to be compared
|
359
|
+
def ==(o)
|
360
|
+
return true if self.equal?(o)
|
361
|
+
self.class == o.class &&
|
362
|
+
bot_id == o.bot_id &&
|
363
|
+
bot_alias == o.bot_alias &&
|
364
|
+
integration_id == o.integration_id &&
|
365
|
+
bot_session_id == o.bot_session_id &&
|
366
|
+
post_text_message == o.post_text_message &&
|
367
|
+
language_code == o.language_code &&
|
368
|
+
bot_session_timeout_minutes == o.bot_session_timeout_minutes &&
|
369
|
+
bot_channels == o.bot_channels &&
|
370
|
+
bot_correlation_id == o.bot_correlation_id &&
|
371
|
+
amazon_lex_request == o.amazon_lex_request &&
|
372
|
+
google_dialogflow == o.google_dialogflow
|
373
|
+
end
|
374
|
+
|
375
|
+
# @see the `==` method
|
376
|
+
# @param [Object] Object to be compared
|
377
|
+
def eql?(o)
|
378
|
+
self == o
|
379
|
+
end
|
380
|
+
|
381
|
+
# Calculates hash code according to all attributes.
|
382
|
+
# @return [Fixnum] Hash code
|
383
|
+
def hash
|
384
|
+
[bot_id, bot_alias, integration_id, bot_session_id, post_text_message, language_code, bot_session_timeout_minutes, bot_channels, bot_correlation_id, amazon_lex_request, google_dialogflow].hash
|
385
|
+
end
|
386
|
+
|
387
|
+
# build the object from hash
|
388
|
+
def build_from_hash(attributes)
|
389
|
+
return nil unless attributes.is_a?(Hash)
|
390
|
+
self.class.swagger_types.each_pair do |key, type|
|
391
|
+
if type =~ /^Array<(.*)>/i
|
392
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
393
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
394
|
+
else
|
395
|
+
#TODO show warning in debug mode
|
396
|
+
end
|
397
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
398
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
399
|
+
else
|
400
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
404
|
+
self
|
405
|
+
end
|
406
|
+
|
407
|
+
def _deserialize(type, value)
|
408
|
+
case type.to_sym
|
409
|
+
when :DateTime
|
410
|
+
DateTime.parse(value)
|
411
|
+
when :Date
|
412
|
+
Date.parse(value)
|
413
|
+
when :String
|
414
|
+
value.to_s
|
415
|
+
when :Integer
|
416
|
+
value.to_i
|
417
|
+
when :Float
|
418
|
+
value.to_f
|
419
|
+
when :BOOLEAN
|
420
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
421
|
+
true
|
422
|
+
else
|
423
|
+
false
|
424
|
+
end
|
425
|
+
when :Object
|
426
|
+
# generic object (usually a Hash), return directly
|
427
|
+
value
|
428
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
429
|
+
inner_type = Regexp.last_match[:inner_type]
|
430
|
+
value.map { |v| _deserialize(inner_type, v) }
|
431
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
432
|
+
k_type = Regexp.last_match[:k_type]
|
433
|
+
v_type = Regexp.last_match[:v_type]
|
434
|
+
{}.tap do |hash|
|
435
|
+
value.each do |k, v|
|
436
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
437
|
+
end
|
438
|
+
end
|
439
|
+
else # model
|
440
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
441
|
+
_model.build_from_hash(value)
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
def to_s
|
446
|
+
to_hash.to_s
|
447
|
+
end
|
448
|
+
|
449
|
+
# to_body is an alias to to_body (backward compatibility))
|
450
|
+
def to_body
|
451
|
+
to_hash
|
452
|
+
end
|
453
|
+
|
454
|
+
# return the object in the form of hash
|
455
|
+
def to_hash
|
456
|
+
hash = {}
|
457
|
+
self.class.attribute_map.each_pair do |attr, param|
|
458
|
+
value = self.send(attr)
|
459
|
+
next if value.nil?
|
460
|
+
hash[param] = _to_hash(value)
|
461
|
+
end
|
462
|
+
hash
|
463
|
+
end
|
464
|
+
|
465
|
+
# Method to output non-array value in the form of hash
|
466
|
+
# For object, use to_hash. Otherwise, just return the value
|
467
|
+
def _to_hash(value)
|
468
|
+
if value.is_a?(Array)
|
469
|
+
value.compact.map{ |v| _to_hash(v) }
|
470
|
+
elsif value.is_a?(Hash)
|
471
|
+
{}.tap do |hash|
|
472
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
473
|
+
end
|
474
|
+
elsif value.respond_to? :to_hash
|
475
|
+
value.to_hash
|
476
|
+
else
|
477
|
+
value
|
478
|
+
end
|
479
|
+
end
|
480
|
+
|
481
|
+
end
|
482
|
+
end
|