purecloudplatformclientv2 87.0.0 → 92.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/docs/AmazonLexRequest.md +14 -0
  4. data/docs/AnalyticsEvaluation.md +1 -1
  5. data/docs/ApiUsageQuery.md +16 -0
  6. data/docs/ApiUsageQueryResult.md +14 -0
  7. data/docs/ApiUsageRow.md +25 -0
  8. data/docs/ArchitectApi.md +132 -0
  9. data/docs/AuditApi.md +130 -0
  10. data/docs/AuditQueryEntity.md +14 -0
  11. data/docs/AuditQueryExecutionStatusResponse.md +1 -0
  12. data/docs/AuditQueryRequest.md +1 -0
  13. data/docs/AuditQueryService.md +14 -0
  14. data/docs/AuditQueryServiceMapping.md +13 -0
  15. data/docs/AuditQuerySort.md +14 -0
  16. data/docs/AuditRealtimeQueryRequest.md +18 -0
  17. data/docs/AuditRealtimeQueryResultsResponse.md +17 -0
  18. data/docs/BuAgentScheduleActivity.md +2 -0
  19. data/docs/BuRescheduleRequest.md +2 -2
  20. data/docs/ButtonComponent.md +16 -0
  21. data/docs/CoachingApi.md +1 -1
  22. data/docs/ContentActions.md +17 -0
  23. data/docs/ContentAttachment.md +19 -0
  24. data/docs/ContentGeneric.md +19 -0
  25. data/docs/ContentList.md +19 -0
  26. data/docs/ContentLocation.md +17 -0
  27. data/docs/ContentNotificationTemplate.md +17 -0
  28. data/docs/ContentQuickReply.md +16 -0
  29. data/docs/ConversationAggregationQuery.md +1 -1
  30. data/docs/CreateQueueRequest.md +1 -0
  31. data/docs/EdgeGroup.md +1 -0
  32. data/docs/EntityListing.md +1 -5
  33. data/docs/EvaluationAggregationQuery.md +1 -1
  34. data/docs/ExternalContact.md +2 -0
  35. data/docs/ExternalOrganization.md +2 -0
  36. data/docs/FlowAggregationQuery.md +1 -1
  37. data/docs/FlowExecutionLaunchRequest.md +16 -0
  38. data/docs/FlowExecutionLaunchResponse.md +16 -0
  39. data/docs/FlowRuntimeExecution.md +23 -0
  40. data/docs/GenericSAML.md +22 -0
  41. data/docs/GoogleDialogflowCustomSettings.md +13 -0
  42. data/docs/GroupsApi.md +4 -4
  43. data/docs/IdentityProviderApi.md +187 -0
  44. data/docs/IpAddressAuthentication.md +13 -0
  45. data/docs/KnowledgeSearchResponse.md +1 -1
  46. data/docs/LanguageUnderstandingApi.md +164 -30
  47. data/docs/ListItemComponent.md +19 -0
  48. data/docs/MessageContent.md +19 -0
  49. data/docs/NluDomainVersion.md +3 -1
  50. data/docs/NotificationTemplateBody.md +14 -0
  51. data/docs/NotificationTemplateFooter.md +13 -0
  52. data/docs/NotificationTemplateHeader.md +16 -0
  53. data/docs/NotificationTemplateParameter.md +14 -0
  54. data/docs/OAuthApi.md +208 -0
  55. data/docs/OrganizationApi.md +126 -0
  56. data/docs/PostTextMessage.md +15 -0
  57. data/docs/PostTextRequest.md +23 -0
  58. data/docs/PostTextResponse.md +20 -0
  59. data/docs/Prompt.md +2 -2
  60. data/docs/Queue.md +1 -0
  61. data/docs/QueueRequest.md +1 -0
  62. data/docs/RecordingApi.md +12 -0
  63. data/docs/ReportingDataExportTopicDataExportNotification.md +1 -0
  64. data/docs/ScimEmail.md +1 -1
  65. data/docs/SurveyAggregationQuery.md +1 -1
  66. data/docs/SurveyForm.md +0 -2
  67. data/docs/TextbotsApi.md +78 -0
  68. data/docs/UploadUrlRequest.md +1 -0
  69. data/docs/UsageApi.md +144 -0
  70. data/docs/UsageExecutionResult.md +14 -0
  71. data/docs/UserAggregationQuery.md +1 -1
  72. data/docs/UserQueue.md +1 -0
  73. data/docs/UsersApi.md +5 -5
  74. data/docs/ViewFilter.md +2 -0
  75. data/docs/VoicemailMessagesTopicOwner.md +13 -0
  76. data/docs/VoicemailMessagesTopicVoicemailCopyRecord.md +14 -0
  77. data/docs/VoicemailMessagesTopicVoicemailMessage.md +2 -0
  78. data/docs/WfmBuShortTermForecastImportCompleteTopicBuForecastModification.md +23 -0
  79. data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecast.md +24 -0
  80. data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecastNotification.md +15 -0
  81. data/docs/WfmBuShortTermForecastImportCompleteTopicForecastSourceDayPointer.md +17 -0
  82. data/docs/WfmBuShortTermForecastImportCompleteTopicModificationIntervalOffsetValue.md +14 -0
  83. data/docs/WfmBuShortTermForecastImportCompleteTopicUserReference.md +13 -0
  84. data/docs/WfmBuShortTermForecastImportCompleteTopicWfmVersionedEntityMetadata.md +15 -0
  85. data/docs/WorkforceManagementApi.md +3 -3
  86. data/lib/purecloudplatformclientv2.rb +45 -0
  87. data/lib/purecloudplatformclientv2/api/architect_api.rb +130 -0
  88. data/lib/purecloudplatformclientv2/api/audit_api.rb +129 -0
  89. data/lib/purecloudplatformclientv2/api/groups_api.rb +4 -4
  90. data/lib/purecloudplatformclientv2/api/identity_provider_api.rb +175 -0
  91. data/lib/purecloudplatformclientv2/api/language_understanding_api.rb +189 -30
  92. data/lib/purecloudplatformclientv2/api/o_auth_api.rb +224 -0
  93. data/lib/purecloudplatformclientv2/api/organization_api.rb +120 -0
  94. data/lib/purecloudplatformclientv2/api/recording_api.rb +78 -0
  95. data/lib/purecloudplatformclientv2/api/textbots_api.rb +92 -0
  96. data/lib/purecloudplatformclientv2/api/usage_api.rb +157 -0
  97. data/lib/purecloudplatformclientv2/api/users_api.rb +4 -4
  98. data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +6 -6
  99. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  100. data/lib/purecloudplatformclientv2/models/amazon_lex_request.rb +232 -0
  101. data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
  102. data/lib/purecloudplatformclientv2/models/api_usage_query.rb +303 -0
  103. data/lib/purecloudplatformclientv2/models/api_usage_query_result.rb +244 -0
  104. data/lib/purecloudplatformclientv2/models/api_usage_row.rb +514 -0
  105. data/lib/purecloudplatformclientv2/models/audit_log_message.rb +6 -6
  106. data/lib/purecloudplatformclientv2/models/audit_query_entity.rb +244 -0
  107. data/lib/purecloudplatformclientv2/models/audit_query_execution_status_response.rb +34 -6
  108. data/lib/purecloudplatformclientv2/models/audit_query_request.rb +34 -6
  109. data/lib/purecloudplatformclientv2/models/audit_query_service.rb +244 -0
  110. data/lib/purecloudplatformclientv2/models/audit_query_service_mapping.rb +204 -0
  111. data/lib/purecloudplatformclientv2/models/audit_query_sort.rb +266 -0
  112. data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +360 -0
  113. data/lib/purecloudplatformclientv2/models/audit_realtime_query_results_response.rb +303 -0
  114. data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +70 -4
  115. data/lib/purecloudplatformclientv2/models/bu_reschedule_request.rb +2 -12
  116. data/lib/purecloudplatformclientv2/models/button_component.rb +281 -0
  117. data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +2 -2
  118. data/lib/purecloudplatformclientv2/models/coaching_notification.rb +2 -2
  119. data/lib/purecloudplatformclientv2/models/content_actions.rb +309 -0
  120. data/lib/purecloudplatformclientv2/models/content_attachment.rb +378 -0
  121. data/lib/purecloudplatformclientv2/models/content_generic.rb +361 -0
  122. data/lib/purecloudplatformclientv2/models/content_list.rb +375 -0
  123. data/lib/purecloudplatformclientv2/models/content_location.rb +307 -0
  124. data/lib/purecloudplatformclientv2/models/content_notification_template.rb +312 -0
  125. data/lib/purecloudplatformclientv2/models/content_quick_reply.rb +300 -0
  126. data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
  127. data/lib/purecloudplatformclientv2/models/conversation_aggregation_query.rb +1 -1
  128. data/lib/purecloudplatformclientv2/models/create_queue_request.rb +29 -1
  129. data/lib/purecloudplatformclientv2/models/edge_group.rb +27 -1
  130. data/lib/purecloudplatformclientv2/models/entity_listing.rb +4 -104
  131. data/lib/purecloudplatformclientv2/models/evaluation_aggregation_query.rb +1 -1
  132. data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
  133. data/lib/purecloudplatformclientv2/models/external_contact.rb +55 -1
  134. data/lib/purecloudplatformclientv2/models/external_organization.rb +55 -1
  135. data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
  136. data/lib/purecloudplatformclientv2/models/flow_aggregation_query.rb +1 -1
  137. data/lib/purecloudplatformclientv2/models/flow_execution_launch_request.rb +288 -0
  138. data/lib/purecloudplatformclientv2/models/flow_execution_launch_response.rb +281 -0
  139. data/lib/purecloudplatformclientv2/models/flow_runtime_execution.rb +494 -0
  140. data/lib/purecloudplatformclientv2/models/generic_saml.rb +428 -0
  141. data/lib/purecloudplatformclientv2/models/google_dialogflow_custom_settings.rb +202 -0
  142. data/lib/purecloudplatformclientv2/models/ip_address_authentication.rb +203 -0
  143. data/lib/purecloudplatformclientv2/models/knowledge_search_response.rb +18 -18
  144. data/lib/purecloudplatformclientv2/models/list_item_component.rb +373 -0
  145. data/lib/purecloudplatformclientv2/models/message_content.rb +378 -0
  146. data/lib/purecloudplatformclientv2/models/nlu_domain_version.rb +72 -1
  147. data/lib/purecloudplatformclientv2/models/notification_template_body.rb +236 -0
  148. data/lib/purecloudplatformclientv2/models/notification_template_footer.rb +203 -0
  149. data/lib/purecloudplatformclientv2/models/notification_template_header.rb +302 -0
  150. data/lib/purecloudplatformclientv2/models/notification_template_parameter.rb +234 -0
  151. data/lib/purecloudplatformclientv2/models/post_text_message.rb +275 -0
  152. data/lib/purecloudplatformclientv2/models/post_text_request.rb +482 -0
  153. data/lib/purecloudplatformclientv2/models/post_text_response.rb +413 -0
  154. data/lib/purecloudplatformclientv2/models/prompt.rb +2 -0
  155. data/lib/purecloudplatformclientv2/models/prompt_asset.rb +15 -1
  156. data/lib/purecloudplatformclientv2/models/prompt_asset_create.rb +15 -1
  157. data/lib/purecloudplatformclientv2/models/queue.rb +29 -1
  158. data/lib/purecloudplatformclientv2/models/queue_request.rb +29 -1
  159. data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +31 -4
  160. data/lib/purecloudplatformclientv2/models/scim_email.rb +1 -1
  161. data/lib/purecloudplatformclientv2/models/survey_aggregation_query.rb +1 -1
  162. data/lib/purecloudplatformclientv2/models/survey_form.rb +1 -53
  163. data/lib/purecloudplatformclientv2/models/upload_url_request.rb +43 -4
  164. data/lib/purecloudplatformclientv2/models/usage_execution_result.rb +228 -0
  165. data/lib/purecloudplatformclientv2/models/user_aggregation_query.rb +1 -1
  166. data/lib/purecloudplatformclientv2/models/user_queue.rb +29 -1
  167. data/lib/purecloudplatformclientv2/models/view_filter.rb +58 -4
  168. data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_owner.rb +201 -0
  169. data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_copy_record.rb +226 -0
  170. data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_message.rb +56 -4
  171. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_forecast_modification.rb +497 -0
  172. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast.rb +494 -0
  173. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast_notification.rb +265 -0
  174. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_forecast_source_day_pointer.rb +315 -0
  175. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_modification_interval_offset_value.rb +226 -0
  176. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_user_reference.rb +201 -0
  177. data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_wfm_versioned_entity_metadata.rb +251 -0
  178. data/lib/purecloudplatformclientv2/version.rb +1 -1
  179. metadata +92 -2
@@ -0,0 +1,281 @@
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
+ # Response object from launching a flow.
21
+ class FlowExecutionLaunchResponse
22
+ # The flow execution ID
23
+ attr_accessor :id
24
+
25
+ # The flow execution name.
26
+ attr_accessor :name
27
+
28
+ # The version of the flow that launched
29
+ attr_accessor :flow_version
30
+
31
+ # The URI for this object
32
+ attr_accessor :self_uri
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+
38
+ :'id' => :'id',
39
+
40
+ :'name' => :'name',
41
+
42
+ :'flow_version' => :'flowVersion',
43
+
44
+ :'self_uri' => :'selfUri'
45
+
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+
53
+ :'id' => :'String',
54
+
55
+ :'name' => :'String',
56
+
57
+ :'flow_version' => :'DomainEntityRef',
58
+
59
+ :'self_uri' => :'String'
60
+
61
+ }
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ return unless attributes.is_a?(Hash)
68
+
69
+ # convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
71
+
72
+
73
+ if attributes.has_key?(:'id')
74
+
75
+
76
+ self.id = attributes[:'id']
77
+
78
+
79
+ end
80
+
81
+
82
+ if attributes.has_key?(:'name')
83
+
84
+
85
+ self.name = attributes[:'name']
86
+
87
+
88
+ end
89
+
90
+
91
+ if attributes.has_key?(:'flowVersion')
92
+
93
+
94
+ self.flow_version = attributes[:'flowVersion']
95
+
96
+
97
+ end
98
+
99
+
100
+ if attributes.has_key?(:'selfUri')
101
+
102
+
103
+ self.self_uri = attributes[:'selfUri']
104
+
105
+
106
+ end
107
+
108
+
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properies with the reasons
113
+ def list_invalid_properties
114
+ invalid_properties = Array.new
115
+
116
+
117
+ return invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ end
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ # Checks equality by comparing each attribute.
164
+ # @param [Object] Object to be compared
165
+ def ==(o)
166
+ return true if self.equal?(o)
167
+ self.class == o.class &&
168
+ id == o.id &&
169
+ name == o.name &&
170
+ flow_version == o.flow_version &&
171
+ self_uri == o.self_uri
172
+ end
173
+
174
+ # @see the `==` method
175
+ # @param [Object] Object to be compared
176
+ def eql?(o)
177
+ self == o
178
+ end
179
+
180
+ # Calculates hash code according to all attributes.
181
+ # @return [Fixnum] Hash code
182
+ def hash
183
+ [id, name, flow_version, self_uri].hash
184
+ end
185
+
186
+ # build the object from hash
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.swagger_types.each_pair do |key, type|
190
+ if type =~ /^Array<(.*)>/i
191
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
192
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
193
+ else
194
+ #TODO show warning in debug mode
195
+ end
196
+ elsif !attributes[self.class.attribute_map[key]].nil?
197
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ else
199
+ # data not found in attributes(hash), not an issue as the data can be optional
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ def _deserialize(type, value)
207
+ case type.to_sym
208
+ when :DateTime
209
+ DateTime.parse(value)
210
+ when :Date
211
+ Date.parse(value)
212
+ when :String
213
+ value.to_s
214
+ when :Integer
215
+ value.to_i
216
+ when :Float
217
+ value.to_f
218
+ when :BOOLEAN
219
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
220
+ true
221
+ else
222
+ false
223
+ end
224
+ when :Object
225
+ # generic object (usually a Hash), return directly
226
+ value
227
+ when /\AArray<(?<inner_type>.+)>\z/
228
+ inner_type = Regexp.last_match[:inner_type]
229
+ value.map { |v| _deserialize(inner_type, v) }
230
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
231
+ k_type = Regexp.last_match[:k_type]
232
+ v_type = Regexp.last_match[:v_type]
233
+ {}.tap do |hash|
234
+ value.each do |k, v|
235
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
236
+ end
237
+ end
238
+ else # model
239
+ _model = Object.const_get("PureCloud").const_get(type).new
240
+ _model.build_from_hash(value)
241
+ end
242
+ end
243
+
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_body (backward compatibility))
249
+ def to_body
250
+ to_hash
251
+ end
252
+
253
+ # return the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ next if value.nil?
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ # Method to output non-array value in the form of hash
265
+ # For object, use to_hash. Otherwise, just return the value
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map{ |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+ end
@@ -0,0 +1,494 @@
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
+ # Details about the current state of a Flow execution
21
+ class FlowRuntimeExecution
22
+ # The flow execution ID
23
+ attr_accessor :id
24
+
25
+ # The flow execution name.
26
+ attr_accessor :name
27
+
28
+ # The Version of the flow definition of the flow execution.
29
+ attr_accessor :flow_version
30
+
31
+ # The time the flow was launched. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
32
+ attr_accessor :date_launched
33
+
34
+ # The flow's running status, which indicates whether the flow is running normally or completed, etc.
35
+ attr_accessor :status
36
+
37
+ # The time the flow completed, if applicable. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
38
+ attr_accessor :date_completed
39
+
40
+ # The completion reason set at the flow completion time, if applicable.
41
+ attr_accessor :completion_reason
42
+
43
+ # Additional information if the flow is in error
44
+ attr_accessor :flow_error_info
45
+
46
+ # List of the flow's output variables, if any. Output variables are only supplied for Completed flows.
47
+ attr_accessor :output_data
48
+
49
+ # The conversation to which this Flow execution is related
50
+ attr_accessor :conversation
51
+
52
+ # The URI for this object
53
+ attr_accessor :self_uri
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+
59
+ :'id' => :'id',
60
+
61
+ :'name' => :'name',
62
+
63
+ :'flow_version' => :'flowVersion',
64
+
65
+ :'date_launched' => :'dateLaunched',
66
+
67
+ :'status' => :'status',
68
+
69
+ :'date_completed' => :'dateCompleted',
70
+
71
+ :'completion_reason' => :'completionReason',
72
+
73
+ :'flow_error_info' => :'flowErrorInfo',
74
+
75
+ :'output_data' => :'outputData',
76
+
77
+ :'conversation' => :'conversation',
78
+
79
+ :'self_uri' => :'selfUri'
80
+
81
+ }
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.swagger_types
86
+ {
87
+
88
+ :'id' => :'String',
89
+
90
+ :'name' => :'String',
91
+
92
+ :'flow_version' => :'FlowVersion',
93
+
94
+ :'date_launched' => :'DateTime',
95
+
96
+ :'status' => :'String',
97
+
98
+ :'date_completed' => :'DateTime',
99
+
100
+ :'completion_reason' => :'String',
101
+
102
+ :'flow_error_info' => :'ErrorBody',
103
+
104
+ :'output_data' => :'Hash<String, Object>',
105
+
106
+ :'conversation' => :'DomainEntityRef',
107
+
108
+ :'self_uri' => :'String'
109
+
110
+ }
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ return unless attributes.is_a?(Hash)
117
+
118
+ # convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
120
+
121
+
122
+ if attributes.has_key?(:'id')
123
+
124
+
125
+ self.id = attributes[:'id']
126
+
127
+
128
+ end
129
+
130
+
131
+ if attributes.has_key?(:'name')
132
+
133
+
134
+ self.name = attributes[:'name']
135
+
136
+
137
+ end
138
+
139
+
140
+ if attributes.has_key?(:'flowVersion')
141
+
142
+
143
+ self.flow_version = attributes[:'flowVersion']
144
+
145
+
146
+ end
147
+
148
+
149
+ if attributes.has_key?(:'dateLaunched')
150
+
151
+
152
+ self.date_launched = attributes[:'dateLaunched']
153
+
154
+
155
+ end
156
+
157
+
158
+ if attributes.has_key?(:'status')
159
+
160
+
161
+ self.status = attributes[:'status']
162
+
163
+
164
+ end
165
+
166
+
167
+ if attributes.has_key?(:'dateCompleted')
168
+
169
+
170
+ self.date_completed = attributes[:'dateCompleted']
171
+
172
+
173
+ end
174
+
175
+
176
+ if attributes.has_key?(:'completionReason')
177
+
178
+
179
+ self.completion_reason = attributes[:'completionReason']
180
+
181
+
182
+ end
183
+
184
+
185
+ if attributes.has_key?(:'flowErrorInfo')
186
+
187
+
188
+ self.flow_error_info = attributes[:'flowErrorInfo']
189
+
190
+
191
+ end
192
+
193
+
194
+ if attributes.has_key?(:'outputData')
195
+
196
+ if (value = attributes[:'outputData']).is_a?(Array)
197
+ self.output_data = value
198
+ end
199
+
200
+
201
+
202
+ end
203
+
204
+
205
+ if attributes.has_key?(:'conversation')
206
+
207
+
208
+ self.conversation = attributes[:'conversation']
209
+
210
+
211
+ end
212
+
213
+
214
+ if attributes.has_key?(:'selfUri')
215
+
216
+
217
+ self.self_uri = attributes[:'selfUri']
218
+
219
+
220
+ end
221
+
222
+
223
+ end
224
+
225
+ # Show invalid properties with the reasons. Usually used together with valid?
226
+ # @return Array for valid properies with the reasons
227
+ def list_invalid_properties
228
+ invalid_properties = Array.new
229
+
230
+
231
+ return invalid_properties
232
+ end
233
+
234
+ # Check to see if the all the properties in the model are valid
235
+ # @return true if the model is valid
236
+ def valid?
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+ if @flow_version.nil?
248
+ return false
249
+ end
250
+
251
+
252
+
253
+
254
+
255
+
256
+ if @date_launched.nil?
257
+ return false
258
+ end
259
+
260
+
261
+
262
+
263
+
264
+
265
+ if @status.nil?
266
+ return false
267
+ end
268
+
269
+
270
+
271
+ allowed_values = ["UNKNOWN", "RUNNING", "ERROR", "TERMINATED", "COMPLETED", "FAILED"]
272
+ if @status && !allowed_values.include?(@status)
273
+ return false
274
+ end
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
+
300
+
301
+
302
+ end
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ # Custom attribute writer method checking allowed values (enum).
327
+ # @param [Object] status Object to be assigned
328
+ def status=(status)
329
+ allowed_values = ["UNKNOWN", "RUNNING", "ERROR", "TERMINATED", "COMPLETED", "FAILED"]
330
+ if status && !allowed_values.include?(status)
331
+ fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
332
+ end
333
+ @status = status
334
+ end
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+ # Checks equality by comparing each attribute.
370
+ # @param [Object] Object to be compared
371
+ def ==(o)
372
+ return true if self.equal?(o)
373
+ self.class == o.class &&
374
+ id == o.id &&
375
+ name == o.name &&
376
+ flow_version == o.flow_version &&
377
+ date_launched == o.date_launched &&
378
+ status == o.status &&
379
+ date_completed == o.date_completed &&
380
+ completion_reason == o.completion_reason &&
381
+ flow_error_info == o.flow_error_info &&
382
+ output_data == o.output_data &&
383
+ conversation == o.conversation &&
384
+ self_uri == o.self_uri
385
+ end
386
+
387
+ # @see the `==` method
388
+ # @param [Object] Object to be compared
389
+ def eql?(o)
390
+ self == o
391
+ end
392
+
393
+ # Calculates hash code according to all attributes.
394
+ # @return [Fixnum] Hash code
395
+ def hash
396
+ [id, name, flow_version, date_launched, status, date_completed, completion_reason, flow_error_info, output_data, conversation, self_uri].hash
397
+ end
398
+
399
+ # build the object from hash
400
+ def build_from_hash(attributes)
401
+ return nil unless attributes.is_a?(Hash)
402
+ self.class.swagger_types.each_pair do |key, type|
403
+ if type =~ /^Array<(.*)>/i
404
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
405
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
406
+ else
407
+ #TODO show warning in debug mode
408
+ end
409
+ elsif !attributes[self.class.attribute_map[key]].nil?
410
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
411
+ else
412
+ # data not found in attributes(hash), not an issue as the data can be optional
413
+ end
414
+ end
415
+
416
+ self
417
+ end
418
+
419
+ def _deserialize(type, value)
420
+ case type.to_sym
421
+ when :DateTime
422
+ DateTime.parse(value)
423
+ when :Date
424
+ Date.parse(value)
425
+ when :String
426
+ value.to_s
427
+ when :Integer
428
+ value.to_i
429
+ when :Float
430
+ value.to_f
431
+ when :BOOLEAN
432
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
433
+ true
434
+ else
435
+ false
436
+ end
437
+ when :Object
438
+ # generic object (usually a Hash), return directly
439
+ value
440
+ when /\AArray<(?<inner_type>.+)>\z/
441
+ inner_type = Regexp.last_match[:inner_type]
442
+ value.map { |v| _deserialize(inner_type, v) }
443
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
444
+ k_type = Regexp.last_match[:k_type]
445
+ v_type = Regexp.last_match[:v_type]
446
+ {}.tap do |hash|
447
+ value.each do |k, v|
448
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
449
+ end
450
+ end
451
+ else # model
452
+ _model = Object.const_get("PureCloud").const_get(type).new
453
+ _model.build_from_hash(value)
454
+ end
455
+ end
456
+
457
+ def to_s
458
+ to_hash.to_s
459
+ end
460
+
461
+ # to_body is an alias to to_body (backward compatibility))
462
+ def to_body
463
+ to_hash
464
+ end
465
+
466
+ # return the object in the form of hash
467
+ def to_hash
468
+ hash = {}
469
+ self.class.attribute_map.each_pair do |attr, param|
470
+ value = self.send(attr)
471
+ next if value.nil?
472
+ hash[param] = _to_hash(value)
473
+ end
474
+ hash
475
+ end
476
+
477
+ # Method to output non-array value in the form of hash
478
+ # For object, use to_hash. Otherwise, just return the value
479
+ def _to_hash(value)
480
+ if value.is_a?(Array)
481
+ value.compact.map{ |v| _to_hash(v) }
482
+ elsif value.is_a?(Hash)
483
+ {}.tap do |hash|
484
+ value.each { |k, v| hash[k] = _to_hash(v) }
485
+ end
486
+ elsif value.respond_to? :to_hash
487
+ value.to_hash
488
+ else
489
+ value
490
+ end
491
+ end
492
+
493
+ end
494
+ end