purecloudplatformclientv2 91.0.0 → 92.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/AmazonLexRequest.md +14 -0
- data/docs/AnalyticsEvaluation.md +1 -1
- data/docs/AuditApi.md +70 -0
- data/docs/AuditRealtimeQueryRequest.md +18 -0
- data/docs/AuditRealtimeQueryResultsResponse.md +17 -0
- data/docs/ButtonComponent.md +16 -0
- 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/EdgeGroup.md +1 -0
- data/docs/EntityListing.md +1 -5
- data/docs/GoogleDialogflowCustomSettings.md +13 -0
- data/docs/LanguageUnderstandingApi.md +164 -30
- data/docs/ListItemComponent.md +19 -0
- data/docs/MessageContent.md +19 -0
- data/docs/NluDomainVersion.md +2 -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/PostTextMessage.md +15 -0
- data/docs/PostTextRequest.md +23 -0
- data/docs/PostTextResponse.md +20 -0
- data/docs/SurveyForm.md +0 -2
- data/docs/TextbotsApi.md +78 -0
- data/lib/purecloudplatformclientv2.rb +22 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +74 -0
- data/lib/purecloudplatformclientv2/api/language_understanding_api.rb +189 -30
- data/lib/purecloudplatformclientv2/api/textbots_api.rb +92 -0
- 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/audit_realtime_query_request.rb +360 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_results_response.rb +303 -0
- data/lib/purecloudplatformclientv2/models/button_component.rb +281 -0
- 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/edge_group.rb +27 -1
- data/lib/purecloudplatformclientv2/models/entity_listing.rb +4 -104
- data/lib/purecloudplatformclientv2/models/google_dialogflow_custom_settings.rb +202 -0
- 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 +32 -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/survey_form.rb +1 -53
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +46 -2
@@ -0,0 +1,92 @@
|
|
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 "uri"
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class TextbotsApi
|
21
|
+
attr_accessor :api_client
|
22
|
+
|
23
|
+
def initialize(api_client = ApiClient.default)
|
24
|
+
@api_client = api_client
|
25
|
+
end
|
26
|
+
|
27
|
+
# Send an intent to a bot to start a dialog/interact with it via text
|
28
|
+
# This will either start a bot with the given id or relay a communication to an existing bot session.
|
29
|
+
# @param post_text_request
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @return [PostTextResponse]
|
32
|
+
def post_textbots_bots_execute(post_text_request, opts = {})
|
33
|
+
data, _status_code, _headers = post_textbots_bots_execute_with_http_info(post_text_request, opts)
|
34
|
+
return data
|
35
|
+
end
|
36
|
+
|
37
|
+
# Send an intent to a bot to start a dialog/interact with it via text
|
38
|
+
# This will either start a bot with the given id or relay a communication to an existing bot session.
|
39
|
+
# @param post_text_request
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [Array<(PostTextResponse, Fixnum, Hash)>] PostTextResponse data, response status code and response headers
|
42
|
+
def post_textbots_bots_execute_with_http_info(post_text_request, opts = {})
|
43
|
+
if @api_client.config.debugging
|
44
|
+
@api_client.config.logger.debug "Calling API: TextbotsApi.post_textbots_bots_execute ..."
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
# verify the required parameter 'post_text_request' is set
|
49
|
+
fail ArgumentError, "Missing the required parameter 'post_text_request' when calling TextbotsApi.post_textbots_bots_execute" if post_text_request.nil?
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
# resource path
|
56
|
+
local_var_path = "/api/v2/textbots/bots/execute".sub('{format}','json')
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = {}
|
63
|
+
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
local_header_accept = ['application/json']
|
66
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
67
|
+
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
local_header_content_type = ['application/json']
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = @api_client.object_to_http_body(post_text_request)
|
77
|
+
|
78
|
+
auth_names = ['PureCloud OAuth']
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => 'PostTextResponse')
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: TextbotsApi#post_textbots_bots_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -76,7 +76,7 @@ module PureCloud
|
|
76
76
|
http_method = http_method.to_sym.downcase
|
77
77
|
|
78
78
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
79
|
-
header_params['purecloud-sdk'] = '
|
79
|
+
header_params['purecloud-sdk'] = '92.0.0'
|
80
80
|
query_params = opts[:query_params] || {}
|
81
81
|
form_params = opts[:form_params] || {}
|
82
82
|
|
@@ -0,0 +1,232 @@
|
|
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 AmazonLexRequest
|
21
|
+
# AttributeName/AttributeValue pairs of User Defined Request Attributes to be sent to the amazon bot See - https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-request-attribs
|
22
|
+
attr_accessor :request_attributes
|
23
|
+
|
24
|
+
# AttributeName/AttributeValue pairs of Session Attributes to be sent to the amazon bot. See - https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs
|
25
|
+
attr_accessor :session_attributes
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
|
31
|
+
:'request_attributes' => :'requestAttributes',
|
32
|
+
|
33
|
+
:'session_attributes' => :'sessionAttributes'
|
34
|
+
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
|
42
|
+
:'request_attributes' => :'Hash<String, String>',
|
43
|
+
|
44
|
+
:'session_attributes' => :'Hash<String, String>'
|
45
|
+
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
56
|
+
|
57
|
+
|
58
|
+
if attributes.has_key?(:'requestAttributes')
|
59
|
+
|
60
|
+
if (value = attributes[:'requestAttributes']).is_a?(Array)
|
61
|
+
self.request_attributes = value
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
if attributes.has_key?(:'sessionAttributes')
|
70
|
+
|
71
|
+
if (value = attributes[:'sessionAttributes']).is_a?(Array)
|
72
|
+
self.session_attributes = value
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properies with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
|
87
|
+
|
88
|
+
return invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
# Checks equality by comparing each attribute.
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def ==(o)
|
119
|
+
return true if self.equal?(o)
|
120
|
+
self.class == o.class &&
|
121
|
+
request_attributes == o.request_attributes &&
|
122
|
+
session_attributes == o.session_attributes
|
123
|
+
end
|
124
|
+
|
125
|
+
# @see the `==` method
|
126
|
+
# @param [Object] Object to be compared
|
127
|
+
def eql?(o)
|
128
|
+
self == o
|
129
|
+
end
|
130
|
+
|
131
|
+
# Calculates hash code according to all attributes.
|
132
|
+
# @return [Fixnum] Hash code
|
133
|
+
def hash
|
134
|
+
[request_attributes, session_attributes].hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# build the object from hash
|
138
|
+
def build_from_hash(attributes)
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
140
|
+
self.class.swagger_types.each_pair do |key, type|
|
141
|
+
if type =~ /^Array<(.*)>/i
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
144
|
+
else
|
145
|
+
#TODO show warning in debug mode
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
else
|
150
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
self
|
155
|
+
end
|
156
|
+
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :DateTime
|
160
|
+
DateTime.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :BOOLEAN
|
170
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
191
|
+
_model.build_from_hash(value)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_body (backward compatibility))
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# return the object in the form of hash
|
205
|
+
def to_hash
|
206
|
+
hash = {}
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
208
|
+
value = self.send(attr)
|
209
|
+
next if value.nil?
|
210
|
+
hash[param] = _to_hash(value)
|
211
|
+
end
|
212
|
+
hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Method to output non-array value in the form of hash
|
216
|
+
# For object, use to_hash. Otherwise, just return the value
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map{ |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
232
|
+
end
|
@@ -51,10 +51,10 @@ module PureCloud
|
|
51
51
|
# Whether this evaluation has been deleted
|
52
52
|
attr_accessor :deleted
|
53
53
|
|
54
|
-
attr_accessor :o_total_score
|
55
|
-
|
56
54
|
attr_accessor :o_total_critical_score
|
57
55
|
|
56
|
+
attr_accessor :o_total_score
|
57
|
+
|
58
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
59
|
def self.attribute_map
|
60
60
|
{
|
@@ -81,9 +81,9 @@ module PureCloud
|
|
81
81
|
|
82
82
|
:'deleted' => :'deleted',
|
83
83
|
|
84
|
-
:'
|
84
|
+
:'o_total_critical_score' => :'oTotalCriticalScore',
|
85
85
|
|
86
|
-
:'
|
86
|
+
:'o_total_score' => :'oTotalScore'
|
87
87
|
|
88
88
|
}
|
89
89
|
end
|
@@ -114,9 +114,9 @@ module PureCloud
|
|
114
114
|
|
115
115
|
:'deleted' => :'BOOLEAN',
|
116
116
|
|
117
|
-
:'
|
117
|
+
:'o_total_critical_score' => :'Integer',
|
118
118
|
|
119
|
-
:'
|
119
|
+
:'o_total_score' => :'Integer'
|
120
120
|
|
121
121
|
}
|
122
122
|
end
|
@@ -229,19 +229,19 @@ module PureCloud
|
|
229
229
|
end
|
230
230
|
|
231
231
|
|
232
|
-
if attributes.has_key?(:'
|
232
|
+
if attributes.has_key?(:'oTotalCriticalScore')
|
233
233
|
|
234
234
|
|
235
|
-
self.
|
235
|
+
self.o_total_critical_score = attributes[:'oTotalCriticalScore']
|
236
236
|
|
237
237
|
|
238
238
|
end
|
239
239
|
|
240
240
|
|
241
|
-
if attributes.has_key?(:'
|
241
|
+
if attributes.has_key?(:'oTotalScore')
|
242
242
|
|
243
243
|
|
244
|
-
self.
|
244
|
+
self.o_total_score = attributes[:'oTotalScore']
|
245
245
|
|
246
246
|
|
247
247
|
end
|
@@ -398,8 +398,8 @@ module PureCloud
|
|
398
398
|
calibration_id == o.calibration_id &&
|
399
399
|
rescored == o.rescored &&
|
400
400
|
deleted == o.deleted &&
|
401
|
-
|
402
|
-
|
401
|
+
o_total_critical_score == o.o_total_critical_score &&
|
402
|
+
o_total_score == o.o_total_score
|
403
403
|
end
|
404
404
|
|
405
405
|
# @see the `==` method
|
@@ -411,7 +411,7 @@ module PureCloud
|
|
411
411
|
# Calculates hash code according to all attributes.
|
412
412
|
# @return [Fixnum] Hash code
|
413
413
|
def hash
|
414
|
-
[evaluation_id, evaluator_id, user_id, event_time, queue_id, form_id, context_id, form_name, calibration_id, rescored, deleted,
|
414
|
+
[evaluation_id, evaluator_id, user_id, event_time, queue_id, form_id, context_id, form_name, calibration_id, rescored, deleted, o_total_critical_score, o_total_score].hash
|
415
415
|
end
|
416
416
|
|
417
417
|
# build the object from hash
|
@@ -0,0 +1,360 @@
|
|
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 AuditRealtimeQueryRequest
|
21
|
+
# Date and time range of data to query. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
|
22
|
+
attr_accessor :interval
|
23
|
+
|
24
|
+
# Name of the service to query audits for.
|
25
|
+
attr_accessor :service_name
|
26
|
+
|
27
|
+
# Additional filters for the query.
|
28
|
+
attr_accessor :filters
|
29
|
+
|
30
|
+
# Sort parameter for the query.
|
31
|
+
attr_accessor :sort
|
32
|
+
|
33
|
+
# Page number
|
34
|
+
attr_accessor :page_number
|
35
|
+
|
36
|
+
# Page size
|
37
|
+
attr_accessor :page_size
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
|
43
|
+
:'interval' => :'interval',
|
44
|
+
|
45
|
+
:'service_name' => :'serviceName',
|
46
|
+
|
47
|
+
:'filters' => :'filters',
|
48
|
+
|
49
|
+
:'sort' => :'sort',
|
50
|
+
|
51
|
+
:'page_number' => :'pageNumber',
|
52
|
+
|
53
|
+
:'page_size' => :'pageSize'
|
54
|
+
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
def self.swagger_types
|
60
|
+
{
|
61
|
+
|
62
|
+
:'interval' => :'String',
|
63
|
+
|
64
|
+
:'service_name' => :'String',
|
65
|
+
|
66
|
+
:'filters' => :'Array<AuditQueryFilter>',
|
67
|
+
|
68
|
+
:'sort' => :'Array<AuditQuerySort>',
|
69
|
+
|
70
|
+
:'page_number' => :'Integer',
|
71
|
+
|
72
|
+
:'page_size' => :'Integer'
|
73
|
+
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# Initializes the object
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
79
|
+
def initialize(attributes = {})
|
80
|
+
return unless attributes.is_a?(Hash)
|
81
|
+
|
82
|
+
# convert string to symbol for hash key
|
83
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
84
|
+
|
85
|
+
|
86
|
+
if attributes.has_key?(:'interval')
|
87
|
+
|
88
|
+
|
89
|
+
self.interval = attributes[:'interval']
|
90
|
+
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
if attributes.has_key?(:'serviceName')
|
96
|
+
|
97
|
+
|
98
|
+
self.service_name = attributes[:'serviceName']
|
99
|
+
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
if attributes.has_key?(:'filters')
|
105
|
+
|
106
|
+
if (value = attributes[:'filters']).is_a?(Array)
|
107
|
+
self.filters = value
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
if attributes.has_key?(:'sort')
|
116
|
+
|
117
|
+
if (value = attributes[:'sort']).is_a?(Array)
|
118
|
+
self.sort = value
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
if attributes.has_key?(:'pageNumber')
|
127
|
+
|
128
|
+
|
129
|
+
self.page_number = attributes[:'pageNumber']
|
130
|
+
|
131
|
+
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
if attributes.has_key?(:'pageSize')
|
136
|
+
|
137
|
+
|
138
|
+
self.page_size = attributes[:'pageSize']
|
139
|
+
|
140
|
+
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
147
|
+
# @return Array for valid properies with the reasons
|
148
|
+
def list_invalid_properties
|
149
|
+
invalid_properties = Array.new
|
150
|
+
|
151
|
+
|
152
|
+
return invalid_properties
|
153
|
+
end
|
154
|
+
|
155
|
+
# Check to see if the all the properties in the model are valid
|
156
|
+
# @return true if the model is valid
|
157
|
+
def valid?
|
158
|
+
|
159
|
+
|
160
|
+
if @interval.nil?
|
161
|
+
return false
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
if @service_name.nil?
|
170
|
+
return false
|
171
|
+
end
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
allowed_values = ["ContactCenter", "ContentManagement", "PeoplePermissions", "Quality", "LanguageUnderstanding", "TopicsDefinitions", "PredictiveEngagement", "WorkforceManagement"]
|
176
|
+
if @service_name && !allowed_values.include?(@service_name)
|
177
|
+
return false
|
178
|
+
end
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
end
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
# Custom attribute writer method checking allowed values (enum).
|
208
|
+
# @param [Object] service_name Object to be assigned
|
209
|
+
def service_name=(service_name)
|
210
|
+
allowed_values = ["ContactCenter", "ContentManagement", "PeoplePermissions", "Quality", "LanguageUnderstanding", "TopicsDefinitions", "PredictiveEngagement", "WorkforceManagement"]
|
211
|
+
if service_name && !allowed_values.include?(service_name)
|
212
|
+
fail ArgumentError, "invalid value for 'service_name', must be one of #{allowed_values}."
|
213
|
+
end
|
214
|
+
@service_name = service_name
|
215
|
+
end
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
# Checks equality by comparing each attribute.
|
241
|
+
# @param [Object] Object to be compared
|
242
|
+
def ==(o)
|
243
|
+
return true if self.equal?(o)
|
244
|
+
self.class == o.class &&
|
245
|
+
interval == o.interval &&
|
246
|
+
service_name == o.service_name &&
|
247
|
+
filters == o.filters &&
|
248
|
+
sort == o.sort &&
|
249
|
+
page_number == o.page_number &&
|
250
|
+
page_size == o.page_size
|
251
|
+
end
|
252
|
+
|
253
|
+
# @see the `==` method
|
254
|
+
# @param [Object] Object to be compared
|
255
|
+
def eql?(o)
|
256
|
+
self == o
|
257
|
+
end
|
258
|
+
|
259
|
+
# Calculates hash code according to all attributes.
|
260
|
+
# @return [Fixnum] Hash code
|
261
|
+
def hash
|
262
|
+
[interval, service_name, filters, sort, page_number, page_size].hash
|
263
|
+
end
|
264
|
+
|
265
|
+
# build the object from hash
|
266
|
+
def build_from_hash(attributes)
|
267
|
+
return nil unless attributes.is_a?(Hash)
|
268
|
+
self.class.swagger_types.each_pair do |key, type|
|
269
|
+
if type =~ /^Array<(.*)>/i
|
270
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
271
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
272
|
+
else
|
273
|
+
#TODO show warning in debug mode
|
274
|
+
end
|
275
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
276
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
277
|
+
else
|
278
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
self
|
283
|
+
end
|
284
|
+
|
285
|
+
def _deserialize(type, value)
|
286
|
+
case type.to_sym
|
287
|
+
when :DateTime
|
288
|
+
DateTime.parse(value)
|
289
|
+
when :Date
|
290
|
+
Date.parse(value)
|
291
|
+
when :String
|
292
|
+
value.to_s
|
293
|
+
when :Integer
|
294
|
+
value.to_i
|
295
|
+
when :Float
|
296
|
+
value.to_f
|
297
|
+
when :BOOLEAN
|
298
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
299
|
+
true
|
300
|
+
else
|
301
|
+
false
|
302
|
+
end
|
303
|
+
when :Object
|
304
|
+
# generic object (usually a Hash), return directly
|
305
|
+
value
|
306
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
307
|
+
inner_type = Regexp.last_match[:inner_type]
|
308
|
+
value.map { |v| _deserialize(inner_type, v) }
|
309
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
310
|
+
k_type = Regexp.last_match[:k_type]
|
311
|
+
v_type = Regexp.last_match[:v_type]
|
312
|
+
{}.tap do |hash|
|
313
|
+
value.each do |k, v|
|
314
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
315
|
+
end
|
316
|
+
end
|
317
|
+
else # model
|
318
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
319
|
+
_model.build_from_hash(value)
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
def to_s
|
324
|
+
to_hash.to_s
|
325
|
+
end
|
326
|
+
|
327
|
+
# to_body is an alias to to_body (backward compatibility))
|
328
|
+
def to_body
|
329
|
+
to_hash
|
330
|
+
end
|
331
|
+
|
332
|
+
# return the object in the form of hash
|
333
|
+
def to_hash
|
334
|
+
hash = {}
|
335
|
+
self.class.attribute_map.each_pair do |attr, param|
|
336
|
+
value = self.send(attr)
|
337
|
+
next if value.nil?
|
338
|
+
hash[param] = _to_hash(value)
|
339
|
+
end
|
340
|
+
hash
|
341
|
+
end
|
342
|
+
|
343
|
+
# Method to output non-array value in the form of hash
|
344
|
+
# For object, use to_hash. Otherwise, just return the value
|
345
|
+
def _to_hash(value)
|
346
|
+
if value.is_a?(Array)
|
347
|
+
value.compact.map{ |v| _to_hash(v) }
|
348
|
+
elsif value.is_a?(Hash)
|
349
|
+
{}.tap do |hash|
|
350
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
351
|
+
end
|
352
|
+
elsif value.respond_to? :to_hash
|
353
|
+
value.to_hash
|
354
|
+
else
|
355
|
+
value
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
end
|
360
|
+
end
|