purecloudplatformclientv2 95.0.0 → 96.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/AnalyticsProposedAgent.md +14 -0
- data/docs/AnalyticsSession.md +2 -0
- data/docs/ArrayNode.md +4 -4
- data/docs/AuditApi.md +60 -0
- data/docs/BuAgentSchedulesQueryResponse.md +1 -0
- data/docs/CoachingApi.md +80 -2
- data/docs/CoachingAppointmentAggregateRequest.md +16 -0
- data/docs/CoachingAppointmentAggregateResponse.md +13 -0
- data/docs/CoachingAppointmentResponse.md +1 -0
- data/docs/ConversationMetrics.md +15 -0
- data/docs/ExternalOrganizationTrustorLink.md +1 -2
- data/docs/GenericSAML.md +1 -1
- data/docs/JsonNode.md +4 -4
- data/docs/OAuthClient.md +1 -0
- data/docs/OAuthClientListing.md +1 -0
- data/docs/OAuthClientRequest.md +1 -0
- data/docs/OrgOAuthClient.md +1 -0
- data/docs/Permissions.md +0 -2
- data/docs/QueryRequestClause.md +14 -0
- data/docs/QueryRequestFilter.md +14 -0
- data/docs/QueryRequestPredicate.md +14 -0
- data/docs/QueryResponseData.md +14 -0
- data/docs/QueryResponseGroupedData.md +14 -0
- data/docs/QueryResponseMetric.md +14 -0
- data/docs/QueryResponseStats.md +13 -0
- data/docs/ReportingDataExportTopicDataExportNotification.md +1 -0
- data/docs/ReportingExportJobResponse.md +1 -0
- data/docs/RoutingApi.md +1 -1
- data/docs/SearchApi.md +2 -1
- data/docs/SpeechTextAnalyticsApi.md +66 -0
- data/docs/StatEventFlowOutcomeTopicDatum.md +14 -0
- data/docs/StatEventFlowOutcomeTopicMetric.md +15 -0
- data/docs/StatEventFlowOutcomeTopicStatsNotification.md +14 -0
- data/docs/StatEventFlowTopicDatum.md +14 -0
- data/docs/StatEventFlowTopicMetric.md +15 -0
- data/docs/StatEventFlowTopicStatsNotification.md +14 -0
- data/docs/StatEventWrapUpCodeTopicDatum.md +14 -0
- data/docs/StatEventWrapUpCodeTopicMetric.md +15 -0
- data/docs/StatEventWrapUpCodeTopicStatsNotification.md +14 -0
- data/docs/UserScheduleAdherence.md +1 -0
- data/docs/UserSearchRequest.md +1 -0
- data/docs/UsersApi.md +2 -1
- data/docs/WemCoachingAppointmentTopicCoachingAppointmentNotification.md +1 -0
- data/docs/WfmBusinessUnitReference.md +1 -1
- data/docs/WfmScheduleReference.md +3 -3
- data/docs/WfmUserScheduleAdherenceUpdatedMuTopicUriReference.md +14 -0
- data/docs/WfmUserScheduleAdherenceUpdatedMuTopicUserScheduleAdherenceUpdate.md +1 -0
- data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicQueueReference.md +13 -0
- data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicUriReference.md +14 -0
- data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicUserReference.md +13 -0
- data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicUserScheduleAdherenceUpdate.md +28 -0
- data/docs/WfmUserScheduleAdherenceUpdatedTopicUriReference.md +14 -0
- data/docs/WfmUserScheduleAdherenceUpdatedTopicUserScheduleAdherenceUpdate.md +1 -0
- data/lib/purecloudplatformclientv2.rb +26 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +55 -0
- data/lib/purecloudplatformclientv2/api/coaching_api.rb +127 -0
- data/lib/purecloudplatformclientv2/api/routing_api.rb +2 -2
- data/lib/purecloudplatformclientv2/api/speech_text_analytics_api.rb +65 -0
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/acw_settings.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_proposed_agent.rb +228 -0
- data/lib/purecloudplatformclientv2/models/analytics_session.rb +58 -4
- data/lib/purecloudplatformclientv2/models/array_node.rb +54 -54
- data/lib/purecloudplatformclientv2/models/audit_log_message.rb +6 -6
- data/lib/purecloudplatformclientv2/models/audit_query_entity.rb +2 -2
- data/lib/purecloudplatformclientv2/models/audit_query_execution_status_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/audit_query_request.rb +2 -2
- data/lib/purecloudplatformclientv2/models/audit_query_service.rb +2 -2
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +2 -2
- data/lib/purecloudplatformclientv2/models/bu_agent_schedules_query_response.rb +30 -4
- data/lib/purecloudplatformclientv2/models/coaching_appointment_aggregate_request.rb +294 -0
- data/lib/purecloudplatformclientv2/models/coaching_appointment_aggregate_response.rb +204 -0
- data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +27 -1
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_message_event_topic_message_media_participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_metrics.rb +254 -0
- data/lib/purecloudplatformclientv2/models/create_outbound_messaging_conversation_request.rb +2 -2
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/external_organization_trustor_link.rb +8 -34
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/generic_saml.rb +12 -12
- data/lib/purecloudplatformclientv2/models/ip_address_range.rb +2 -2
- data/lib/purecloudplatformclientv2/models/journey_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/json_node.rb +54 -54
- data/lib/purecloudplatformclientv2/models/message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/message_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/message_media_participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/messaging_integration.rb +2 -2
- data/lib/purecloudplatformclientv2/models/messaging_sticker.rb +2 -2
- data/lib/purecloudplatformclientv2/models/o_auth_client.rb +27 -1
- data/lib/purecloudplatformclientv2/models/o_auth_client_listing.rb +27 -1
- data/lib/purecloudplatformclientv2/models/o_auth_client_request.rb +30 -4
- data/lib/purecloudplatformclientv2/models/org_o_auth_client.rb +27 -1
- data/lib/purecloudplatformclientv2/models/participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/participant_basic.rb +2 -2
- data/lib/purecloudplatformclientv2/models/permissions.rb +1 -52
- data/lib/purecloudplatformclientv2/models/query_request_clause.rb +254 -0
- data/lib/purecloudplatformclientv2/models/query_request_filter.rb +254 -0
- data/lib/purecloudplatformclientv2/models/query_request_predicate.rb +252 -0
- data/lib/purecloudplatformclientv2/models/query_response_data.rb +230 -0
- data/lib/purecloudplatformclientv2/models/query_response_grouped_data.rb +232 -0
- data/lib/purecloudplatformclientv2/models/query_response_metric.rb +242 -0
- data/lib/purecloudplatformclientv2/models/query_response_stats.rb +202 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/queue_conversation_message_event_topic_message_media_participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/recipient.rb +2 -2
- data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +26 -1
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +32 -1
- data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/send_agentless_outbound_message_request.rb +2 -2
- data/lib/purecloudplatformclientv2/models/send_agentless_outbound_message_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/stat_event_flow_outcome_topic_datum.rb +228 -0
- data/lib/purecloudplatformclientv2/models/stat_event_flow_outcome_topic_metric.rb +253 -0
- data/lib/purecloudplatformclientv2/models/stat_event_flow_outcome_topic_stats_notification.rb +230 -0
- data/lib/purecloudplatformclientv2/models/stat_event_flow_topic_datum.rb +228 -0
- data/lib/purecloudplatformclientv2/models/stat_event_flow_topic_metric.rb +253 -0
- data/lib/purecloudplatformclientv2/models/stat_event_flow_topic_stats_notification.rb +230 -0
- data/lib/purecloudplatformclientv2/models/stat_event_wrap_up_code_topic_datum.rb +228 -0
- data/lib/purecloudplatformclientv2/models/stat_event_wrap_up_code_topic_metric.rb +253 -0
- data/lib/purecloudplatformclientv2/models/stat_event_wrap_up_code_topic_stats_notification.rb +230 -0
- data/lib/purecloudplatformclientv2/models/user_schedule_adherence.rb +27 -1
- data/lib/purecloudplatformclientv2/models/user_search_request.rb +30 -4
- data/lib/purecloudplatformclientv2/models/wem_coaching_appointment_topic_coaching_appointment_notification.rb +29 -4
- data/lib/purecloudplatformclientv2/models/wfm_business_unit_reference.rb +6 -1
- data/lib/purecloudplatformclientv2/models/wfm_schedule_reference.rb +16 -1
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_mu_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_mu_topic_user_schedule_adherence_update.rb +26 -1
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_queue_reference.rb +201 -0
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_user_reference.rb +201 -0
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_user_schedule_adherence_update.rb +606 -0
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_topic_user_schedule_adherence_update.rb +26 -1
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +55 -3
|
@@ -18,11 +18,6 @@ require 'date'
|
|
|
18
18
|
|
|
19
19
|
module PureCloud
|
|
20
20
|
class Permissions
|
|
21
|
-
# The globally unique identifier for the object.
|
|
22
|
-
attr_accessor :id
|
|
23
|
-
|
|
24
|
-
attr_accessor :name
|
|
25
|
-
|
|
26
21
|
# List of permission ids.
|
|
27
22
|
attr_accessor :ids
|
|
28
23
|
|
|
@@ -30,10 +25,6 @@ module PureCloud
|
|
|
30
25
|
def self.attribute_map
|
|
31
26
|
{
|
|
32
27
|
|
|
33
|
-
:'id' => :'id',
|
|
34
|
-
|
|
35
|
-
:'name' => :'name',
|
|
36
|
-
|
|
37
28
|
:'ids' => :'ids'
|
|
38
29
|
|
|
39
30
|
}
|
|
@@ -43,10 +34,6 @@ module PureCloud
|
|
|
43
34
|
def self.swagger_types
|
|
44
35
|
{
|
|
45
36
|
|
|
46
|
-
:'id' => :'String',
|
|
47
|
-
|
|
48
|
-
:'name' => :'String',
|
|
49
|
-
|
|
50
37
|
:'ids' => :'Array<String>'
|
|
51
38
|
|
|
52
39
|
}
|
|
@@ -61,24 +48,6 @@ module PureCloud
|
|
|
61
48
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
62
49
|
|
|
63
50
|
|
|
64
|
-
if attributes.has_key?(:'id')
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
self.id = attributes[:'id']
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if attributes.has_key?(:'name')
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
self.name = attributes[:'name']
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
|
|
82
51
|
if attributes.has_key?(:'ids')
|
|
83
52
|
|
|
84
53
|
if (value = attributes[:'ids']).is_a?(Array)
|
|
@@ -106,14 +75,6 @@ module PureCloud
|
|
|
106
75
|
def valid?
|
|
107
76
|
|
|
108
77
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
78
|
if @ids.nil?
|
|
118
79
|
return false
|
|
119
80
|
end
|
|
@@ -130,23 +91,11 @@ module PureCloud
|
|
|
130
91
|
|
|
131
92
|
|
|
132
93
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
94
|
# Checks equality by comparing each attribute.
|
|
144
95
|
# @param [Object] Object to be compared
|
|
145
96
|
def ==(o)
|
|
146
97
|
return true if self.equal?(o)
|
|
147
98
|
self.class == o.class &&
|
|
148
|
-
id == o.id &&
|
|
149
|
-
name == o.name &&
|
|
150
99
|
ids == o.ids
|
|
151
100
|
end
|
|
152
101
|
|
|
@@ -159,7 +108,7 @@ module PureCloud
|
|
|
159
108
|
# Calculates hash code according to all attributes.
|
|
160
109
|
# @return [Fixnum] Hash code
|
|
161
110
|
def hash
|
|
162
|
-
[
|
|
111
|
+
[ids].hash
|
|
163
112
|
end
|
|
164
113
|
|
|
165
114
|
# build the object from hash
|
|
@@ -0,0 +1,254 @@
|
|
|
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 QueryRequestClause
|
|
21
|
+
# The logic used to combine the predicates
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
# The list of predicates used to filter the data
|
|
25
|
+
attr_accessor :predicates
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
|
|
31
|
+
:'type' => :'type',
|
|
32
|
+
|
|
33
|
+
:'predicates' => :'predicates'
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.swagger_types
|
|
40
|
+
{
|
|
41
|
+
|
|
42
|
+
:'type' => :'String',
|
|
43
|
+
|
|
44
|
+
:'predicates' => :'Array<QueryRequestPredicate>'
|
|
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?(:'type')
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
self.type = attributes[:'type']
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if attributes.has_key?(:'predicates')
|
|
68
|
+
|
|
69
|
+
if (value = attributes[:'predicates']).is_a?(Array)
|
|
70
|
+
self.predicates = value
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properies with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
return invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if @type.nil?
|
|
95
|
+
return false
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
allowed_values = ["And", "Or"]
|
|
101
|
+
if @type && !allowed_values.include?(@type)
|
|
102
|
+
return false
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
if @predicates.nil?
|
|
109
|
+
return false
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
121
|
+
# @param [Object] type Object to be assigned
|
|
122
|
+
def type=(type)
|
|
123
|
+
allowed_values = ["And", "Or"]
|
|
124
|
+
if type && !allowed_values.include?(type)
|
|
125
|
+
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
|
126
|
+
end
|
|
127
|
+
@type = type
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
type == o.type &&
|
|
144
|
+
predicates == o.predicates
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Fixnum] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[type, predicates].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# build the object from hash
|
|
160
|
+
def build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
163
|
+
if type =~ /^Array<(.*)>/i
|
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
166
|
+
else
|
|
167
|
+
#TODO show warning in debug mode
|
|
168
|
+
end
|
|
169
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
170
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
171
|
+
else
|
|
172
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
self
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def _deserialize(type, value)
|
|
180
|
+
case type.to_sym
|
|
181
|
+
when :DateTime
|
|
182
|
+
DateTime.parse(value)
|
|
183
|
+
when :Date
|
|
184
|
+
Date.parse(value)
|
|
185
|
+
when :String
|
|
186
|
+
value.to_s
|
|
187
|
+
when :Integer
|
|
188
|
+
value.to_i
|
|
189
|
+
when :Float
|
|
190
|
+
value.to_f
|
|
191
|
+
when :BOOLEAN
|
|
192
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
193
|
+
true
|
|
194
|
+
else
|
|
195
|
+
false
|
|
196
|
+
end
|
|
197
|
+
when :Object
|
|
198
|
+
# generic object (usually a Hash), return directly
|
|
199
|
+
value
|
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
203
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each do |k, v|
|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
else # model
|
|
212
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
213
|
+
_model.build_from_hash(value)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def to_s
|
|
218
|
+
to_hash.to_s
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
222
|
+
def to_body
|
|
223
|
+
to_hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# return the object in the form of hash
|
|
227
|
+
def to_hash
|
|
228
|
+
hash = {}
|
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
230
|
+
value = self.send(attr)
|
|
231
|
+
next if value.nil?
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Method to output non-array value in the form of hash
|
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
+
def _to_hash(value)
|
|
240
|
+
if value.is_a?(Array)
|
|
241
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
242
|
+
elsif value.is_a?(Hash)
|
|
243
|
+
{}.tap do |hash|
|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
245
|
+
end
|
|
246
|
+
elsif value.respond_to? :to_hash
|
|
247
|
+
value.to_hash
|
|
248
|
+
else
|
|
249
|
+
value
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
end
|
|
254
|
+
end
|
|
@@ -0,0 +1,254 @@
|
|
|
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 QueryRequestFilter
|
|
21
|
+
# The logic used to combine the clauses
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
# The list of clauses used to filter the data
|
|
25
|
+
attr_accessor :clauses
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
|
|
31
|
+
:'type' => :'type',
|
|
32
|
+
|
|
33
|
+
:'clauses' => :'clauses'
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.swagger_types
|
|
40
|
+
{
|
|
41
|
+
|
|
42
|
+
:'type' => :'String',
|
|
43
|
+
|
|
44
|
+
:'clauses' => :'Array<QueryRequestClause>'
|
|
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?(:'type')
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
self.type = attributes[:'type']
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if attributes.has_key?(:'clauses')
|
|
68
|
+
|
|
69
|
+
if (value = attributes[:'clauses']).is_a?(Array)
|
|
70
|
+
self.clauses = value
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properies with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
return invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if @type.nil?
|
|
95
|
+
return false
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
allowed_values = ["And", "Or"]
|
|
101
|
+
if @type && !allowed_values.include?(@type)
|
|
102
|
+
return false
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
if @clauses.nil?
|
|
109
|
+
return false
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
121
|
+
# @param [Object] type Object to be assigned
|
|
122
|
+
def type=(type)
|
|
123
|
+
allowed_values = ["And", "Or"]
|
|
124
|
+
if type && !allowed_values.include?(type)
|
|
125
|
+
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
|
126
|
+
end
|
|
127
|
+
@type = type
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
type == o.type &&
|
|
144
|
+
clauses == o.clauses
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Fixnum] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[type, clauses].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# build the object from hash
|
|
160
|
+
def build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
163
|
+
if type =~ /^Array<(.*)>/i
|
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
166
|
+
else
|
|
167
|
+
#TODO show warning in debug mode
|
|
168
|
+
end
|
|
169
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
170
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
171
|
+
else
|
|
172
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
self
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def _deserialize(type, value)
|
|
180
|
+
case type.to_sym
|
|
181
|
+
when :DateTime
|
|
182
|
+
DateTime.parse(value)
|
|
183
|
+
when :Date
|
|
184
|
+
Date.parse(value)
|
|
185
|
+
when :String
|
|
186
|
+
value.to_s
|
|
187
|
+
when :Integer
|
|
188
|
+
value.to_i
|
|
189
|
+
when :Float
|
|
190
|
+
value.to_f
|
|
191
|
+
when :BOOLEAN
|
|
192
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
193
|
+
true
|
|
194
|
+
else
|
|
195
|
+
false
|
|
196
|
+
end
|
|
197
|
+
when :Object
|
|
198
|
+
# generic object (usually a Hash), return directly
|
|
199
|
+
value
|
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
203
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each do |k, v|
|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
else # model
|
|
212
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
213
|
+
_model.build_from_hash(value)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def to_s
|
|
218
|
+
to_hash.to_s
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
222
|
+
def to_body
|
|
223
|
+
to_hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# return the object in the form of hash
|
|
227
|
+
def to_hash
|
|
228
|
+
hash = {}
|
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
230
|
+
value = self.send(attr)
|
|
231
|
+
next if value.nil?
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Method to output non-array value in the form of hash
|
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
+
def _to_hash(value)
|
|
240
|
+
if value.is_a?(Array)
|
|
241
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
242
|
+
elsif value.is_a?(Hash)
|
|
243
|
+
{}.tap do |hash|
|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
245
|
+
end
|
|
246
|
+
elsif value.respond_to? :to_hash
|
|
247
|
+
value.to_hash
|
|
248
|
+
else
|
|
249
|
+
value
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
end
|
|
254
|
+
end
|