purecloudplatformclientv2 95.0.0 → 96.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AnalyticsProposedAgent.md +14 -0
  4. data/docs/AnalyticsSession.md +2 -0
  5. data/docs/ArrayNode.md +4 -4
  6. data/docs/AuditApi.md +60 -0
  7. data/docs/BuAgentSchedulesQueryResponse.md +1 -0
  8. data/docs/CoachingApi.md +80 -2
  9. data/docs/CoachingAppointmentAggregateRequest.md +16 -0
  10. data/docs/CoachingAppointmentAggregateResponse.md +13 -0
  11. data/docs/CoachingAppointmentResponse.md +1 -0
  12. data/docs/ConversationMetrics.md +15 -0
  13. data/docs/ExternalOrganizationTrustorLink.md +1 -2
  14. data/docs/GenericSAML.md +1 -1
  15. data/docs/JsonNode.md +4 -4
  16. data/docs/OAuthClient.md +1 -0
  17. data/docs/OAuthClientListing.md +1 -0
  18. data/docs/OAuthClientRequest.md +1 -0
  19. data/docs/OrgOAuthClient.md +1 -0
  20. data/docs/Permissions.md +0 -2
  21. data/docs/QueryRequestClause.md +14 -0
  22. data/docs/QueryRequestFilter.md +14 -0
  23. data/docs/QueryRequestPredicate.md +14 -0
  24. data/docs/QueryResponseData.md +14 -0
  25. data/docs/QueryResponseGroupedData.md +14 -0
  26. data/docs/QueryResponseMetric.md +14 -0
  27. data/docs/QueryResponseStats.md +13 -0
  28. data/docs/ReportingDataExportTopicDataExportNotification.md +1 -0
  29. data/docs/ReportingExportJobResponse.md +1 -0
  30. data/docs/RoutingApi.md +1 -1
  31. data/docs/SearchApi.md +2 -1
  32. data/docs/SpeechTextAnalyticsApi.md +66 -0
  33. data/docs/StatEventFlowOutcomeTopicDatum.md +14 -0
  34. data/docs/StatEventFlowOutcomeTopicMetric.md +15 -0
  35. data/docs/StatEventFlowOutcomeTopicStatsNotification.md +14 -0
  36. data/docs/StatEventFlowTopicDatum.md +14 -0
  37. data/docs/StatEventFlowTopicMetric.md +15 -0
  38. data/docs/StatEventFlowTopicStatsNotification.md +14 -0
  39. data/docs/StatEventWrapUpCodeTopicDatum.md +14 -0
  40. data/docs/StatEventWrapUpCodeTopicMetric.md +15 -0
  41. data/docs/StatEventWrapUpCodeTopicStatsNotification.md +14 -0
  42. data/docs/UserScheduleAdherence.md +1 -0
  43. data/docs/UserSearchRequest.md +1 -0
  44. data/docs/UsersApi.md +2 -1
  45. data/docs/WemCoachingAppointmentTopicCoachingAppointmentNotification.md +1 -0
  46. data/docs/WfmBusinessUnitReference.md +1 -1
  47. data/docs/WfmScheduleReference.md +3 -3
  48. data/docs/WfmUserScheduleAdherenceUpdatedMuTopicUriReference.md +14 -0
  49. data/docs/WfmUserScheduleAdherenceUpdatedMuTopicUserScheduleAdherenceUpdate.md +1 -0
  50. data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicQueueReference.md +13 -0
  51. data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicUriReference.md +14 -0
  52. data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicUserReference.md +13 -0
  53. data/docs/WfmUserScheduleAdherenceUpdatedTeamTopicUserScheduleAdherenceUpdate.md +28 -0
  54. data/docs/WfmUserScheduleAdherenceUpdatedTopicUriReference.md +14 -0
  55. data/docs/WfmUserScheduleAdherenceUpdatedTopicUserScheduleAdherenceUpdate.md +1 -0
  56. data/lib/purecloudplatformclientv2.rb +26 -0
  57. data/lib/purecloudplatformclientv2/api/audit_api.rb +55 -0
  58. data/lib/purecloudplatformclientv2/api/coaching_api.rb +127 -0
  59. data/lib/purecloudplatformclientv2/api/routing_api.rb +2 -2
  60. data/lib/purecloudplatformclientv2/api/speech_text_analytics_api.rb +65 -0
  61. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  62. data/lib/purecloudplatformclientv2/models/acw_settings.rb +2 -2
  63. data/lib/purecloudplatformclientv2/models/analytics_proposed_agent.rb +228 -0
  64. data/lib/purecloudplatformclientv2/models/analytics_session.rb +58 -4
  65. data/lib/purecloudplatformclientv2/models/array_node.rb +54 -54
  66. data/lib/purecloudplatformclientv2/models/audit_log_message.rb +6 -6
  67. data/lib/purecloudplatformclientv2/models/audit_query_entity.rb +2 -2
  68. data/lib/purecloudplatformclientv2/models/audit_query_execution_status_response.rb +2 -2
  69. data/lib/purecloudplatformclientv2/models/audit_query_request.rb +2 -2
  70. data/lib/purecloudplatformclientv2/models/audit_query_service.rb +2 -2
  71. data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +2 -2
  72. data/lib/purecloudplatformclientv2/models/bu_agent_schedules_query_response.rb +30 -4
  73. data/lib/purecloudplatformclientv2/models/coaching_appointment_aggregate_request.rb +294 -0
  74. data/lib/purecloudplatformclientv2/models/coaching_appointment_aggregate_response.rb +204 -0
  75. data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +27 -1
  76. data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
  77. data/lib/purecloudplatformclientv2/models/conversation_event_topic_message.rb +2 -2
  78. data/lib/purecloudplatformclientv2/models/conversation_message_event_topic_message_media_participant.rb +2 -2
  79. data/lib/purecloudplatformclientv2/models/conversation_metrics.rb +254 -0
  80. data/lib/purecloudplatformclientv2/models/create_outbound_messaging_conversation_request.rb +2 -2
  81. data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
  82. data/lib/purecloudplatformclientv2/models/external_organization_trustor_link.rb +8 -34
  83. data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
  84. data/lib/purecloudplatformclientv2/models/generic_saml.rb +12 -12
  85. data/lib/purecloudplatformclientv2/models/ip_address_range.rb +2 -2
  86. data/lib/purecloudplatformclientv2/models/journey_aggregate_query_predicate.rb +2 -2
  87. data/lib/purecloudplatformclientv2/models/json_node.rb +54 -54
  88. data/lib/purecloudplatformclientv2/models/message.rb +2 -2
  89. data/lib/purecloudplatformclientv2/models/message_data.rb +2 -2
  90. data/lib/purecloudplatformclientv2/models/message_media_participant.rb +2 -2
  91. data/lib/purecloudplatformclientv2/models/messaging_integration.rb +2 -2
  92. data/lib/purecloudplatformclientv2/models/messaging_sticker.rb +2 -2
  93. data/lib/purecloudplatformclientv2/models/o_auth_client.rb +27 -1
  94. data/lib/purecloudplatformclientv2/models/o_auth_client_listing.rb +27 -1
  95. data/lib/purecloudplatformclientv2/models/o_auth_client_request.rb +30 -4
  96. data/lib/purecloudplatformclientv2/models/org_o_auth_client.rb +27 -1
  97. data/lib/purecloudplatformclientv2/models/participant.rb +2 -2
  98. data/lib/purecloudplatformclientv2/models/participant_basic.rb +2 -2
  99. data/lib/purecloudplatformclientv2/models/permissions.rb +1 -52
  100. data/lib/purecloudplatformclientv2/models/query_request_clause.rb +254 -0
  101. data/lib/purecloudplatformclientv2/models/query_request_filter.rb +254 -0
  102. data/lib/purecloudplatformclientv2/models/query_request_predicate.rb +252 -0
  103. data/lib/purecloudplatformclientv2/models/query_response_data.rb +230 -0
  104. data/lib/purecloudplatformclientv2/models/query_response_grouped_data.rb +232 -0
  105. data/lib/purecloudplatformclientv2/models/query_response_metric.rb +242 -0
  106. data/lib/purecloudplatformclientv2/models/query_response_stats.rb +202 -0
  107. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_message.rb +2 -2
  108. data/lib/purecloudplatformclientv2/models/queue_conversation_message_event_topic_message_media_participant.rb +2 -2
  109. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_message.rb +2 -2
  110. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_message.rb +2 -2
  111. data/lib/purecloudplatformclientv2/models/recipient.rb +2 -2
  112. data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +26 -1
  113. data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +32 -1
  114. data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
  115. data/lib/purecloudplatformclientv2/models/send_agentless_outbound_message_request.rb +2 -2
  116. data/lib/purecloudplatformclientv2/models/send_agentless_outbound_message_response.rb +2 -2
  117. data/lib/purecloudplatformclientv2/models/stat_event_flow_outcome_topic_datum.rb +228 -0
  118. data/lib/purecloudplatformclientv2/models/stat_event_flow_outcome_topic_metric.rb +253 -0
  119. data/lib/purecloudplatformclientv2/models/stat_event_flow_outcome_topic_stats_notification.rb +230 -0
  120. data/lib/purecloudplatformclientv2/models/stat_event_flow_topic_datum.rb +228 -0
  121. data/lib/purecloudplatformclientv2/models/stat_event_flow_topic_metric.rb +253 -0
  122. data/lib/purecloudplatformclientv2/models/stat_event_flow_topic_stats_notification.rb +230 -0
  123. data/lib/purecloudplatformclientv2/models/stat_event_wrap_up_code_topic_datum.rb +228 -0
  124. data/lib/purecloudplatformclientv2/models/stat_event_wrap_up_code_topic_metric.rb +253 -0
  125. data/lib/purecloudplatformclientv2/models/stat_event_wrap_up_code_topic_stats_notification.rb +230 -0
  126. data/lib/purecloudplatformclientv2/models/user_schedule_adherence.rb +27 -1
  127. data/lib/purecloudplatformclientv2/models/user_search_request.rb +30 -4
  128. data/lib/purecloudplatformclientv2/models/wem_coaching_appointment_topic_coaching_appointment_notification.rb +29 -4
  129. data/lib/purecloudplatformclientv2/models/wfm_business_unit_reference.rb +6 -1
  130. data/lib/purecloudplatformclientv2/models/wfm_schedule_reference.rb +16 -1
  131. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_mu_topic_uri_reference.rb +226 -0
  132. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_mu_topic_user_schedule_adherence_update.rb +26 -1
  133. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_queue_reference.rb +201 -0
  134. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_uri_reference.rb +226 -0
  135. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_user_reference.rb +201 -0
  136. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_team_topic_user_schedule_adherence_update.rb +606 -0
  137. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_topic_uri_reference.rb +226 -0
  138. data/lib/purecloudplatformclientv2/models/wfm_user_schedule_adherence_updated_topic_user_schedule_adherence_update.rb +26 -1
  139. data/lib/purecloudplatformclientv2/version.rb +1 -1
  140. metadata +55 -3
@@ -0,0 +1,226 @@
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 WfmUserScheduleAdherenceUpdatedTeamTopicUriReference
21
+ attr_accessor :id
22
+
23
+ attr_accessor :name
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+
29
+ :'id' => :'id',
30
+
31
+ :'name' => :'name'
32
+
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+
40
+ :'id' => :'String',
41
+
42
+ :'name' => :'String'
43
+
44
+ }
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ return unless attributes.is_a?(Hash)
51
+
52
+ # convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
54
+
55
+
56
+ if attributes.has_key?(:'id')
57
+
58
+
59
+ self.id = attributes[:'id']
60
+
61
+
62
+ end
63
+
64
+
65
+ if attributes.has_key?(:'name')
66
+
67
+
68
+ self.name = attributes[:'name']
69
+
70
+
71
+ end
72
+
73
+
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properies with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+
81
+
82
+ return invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ end
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ id == o.id &&
116
+ name == o.name
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Fixnum] Hash code
127
+ def hash
128
+ [id, name].hash
129
+ end
130
+
131
+ # build the object from hash
132
+ def build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ self.class.swagger_types.each_pair do |key, type|
135
+ if type =~ /^Array<(.*)>/i
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
138
+ else
139
+ #TODO show warning in debug mode
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ else
144
+ # data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ _model = Object.const_get("PureCloud").const_get(type).new
185
+ _model.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ def to_s
190
+ to_hash.to_s
191
+ end
192
+
193
+ # to_body is an alias to to_body (backward compatibility))
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # return the object in the form of hash
199
+ def to_hash
200
+ hash = {}
201
+ self.class.attribute_map.each_pair do |attr, param|
202
+ value = self.send(attr)
203
+ next if value.nil?
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Method to output non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map{ |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+ end
@@ -0,0 +1,201 @@
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 WfmUserScheduleAdherenceUpdatedTeamTopicUserReference
21
+ attr_accessor :id
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+
27
+ :'id' => :'id'
28
+
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+
36
+ :'id' => :'String'
37
+
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+
50
+ if attributes.has_key?(:'id')
51
+
52
+
53
+ self.id = attributes[:'id']
54
+
55
+
56
+ end
57
+
58
+
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properies with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+
66
+
67
+ return invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+
74
+
75
+
76
+
77
+
78
+ end
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [id].hash
104
+ end
105
+
106
+ # build the object from hash
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.swagger_types.each_pair do |key, type|
110
+ if type =~ /^Array<(.*)>/i
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
113
+ else
114
+ #TODO show warning in debug mode
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ else
119
+ # data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :BOOLEAN
139
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ _model = Object.const_get("PureCloud").const_get(type).new
160
+ _model.build_from_hash(value)
161
+ end
162
+ end
163
+
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_body (backward compatibility))
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # return the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ next if value.nil?
179
+ hash[param] = _to_hash(value)
180
+ end
181
+ hash
182
+ end
183
+
184
+ # Method to output non-array value in the form of hash
185
+ # For object, use to_hash. Otherwise, just return the value
186
+ def _to_hash(value)
187
+ if value.is_a?(Array)
188
+ value.compact.map{ |v| _to_hash(v) }
189
+ elsif value.is_a?(Hash)
190
+ {}.tap do |hash|
191
+ value.each { |k, v| hash[k] = _to_hash(v) }
192
+ end
193
+ elsif value.respond_to? :to_hash
194
+ value.to_hash
195
+ else
196
+ value
197
+ end
198
+ end
199
+
200
+ end
201
+ end
@@ -0,0 +1,606 @@
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 WfmUserScheduleAdherenceUpdatedTeamTopicUserScheduleAdherenceUpdate
21
+ attr_accessor :user
22
+
23
+ attr_accessor :management_unit_id
24
+
25
+ attr_accessor :team
26
+
27
+ attr_accessor :scheduled_activity_category
28
+
29
+ attr_accessor :system_presence
30
+
31
+ attr_accessor :organization_secondary_presence_id
32
+
33
+ attr_accessor :routing_status
34
+
35
+ attr_accessor :actual_activity_category
36
+
37
+ attr_accessor :is_out_of_office
38
+
39
+ attr_accessor :adherence_state
40
+
41
+ attr_accessor :impact
42
+
43
+ attr_accessor :adherence_change_time
44
+
45
+ attr_accessor :presence_update_time
46
+
47
+ attr_accessor :active_queues
48
+
49
+ attr_accessor :active_queues_modified_time
50
+
51
+ attr_accessor :removed_from_management_unit
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+
57
+ :'user' => :'user',
58
+
59
+ :'management_unit_id' => :'managementUnitId',
60
+
61
+ :'team' => :'team',
62
+
63
+ :'scheduled_activity_category' => :'scheduledActivityCategory',
64
+
65
+ :'system_presence' => :'systemPresence',
66
+
67
+ :'organization_secondary_presence_id' => :'organizationSecondaryPresenceId',
68
+
69
+ :'routing_status' => :'routingStatus',
70
+
71
+ :'actual_activity_category' => :'actualActivityCategory',
72
+
73
+ :'is_out_of_office' => :'isOutOfOffice',
74
+
75
+ :'adherence_state' => :'adherenceState',
76
+
77
+ :'impact' => :'impact',
78
+
79
+ :'adherence_change_time' => :'adherenceChangeTime',
80
+
81
+ :'presence_update_time' => :'presenceUpdateTime',
82
+
83
+ :'active_queues' => :'activeQueues',
84
+
85
+ :'active_queues_modified_time' => :'activeQueuesModifiedTime',
86
+
87
+ :'removed_from_management_unit' => :'removedFromManagementUnit'
88
+
89
+ }
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.swagger_types
94
+ {
95
+
96
+ :'user' => :'WfmUserScheduleAdherenceUpdatedTeamTopicUserReference',
97
+
98
+ :'management_unit_id' => :'String',
99
+
100
+ :'team' => :'WfmUserScheduleAdherenceUpdatedTeamTopicUriReference',
101
+
102
+ :'scheduled_activity_category' => :'String',
103
+
104
+ :'system_presence' => :'String',
105
+
106
+ :'organization_secondary_presence_id' => :'String',
107
+
108
+ :'routing_status' => :'String',
109
+
110
+ :'actual_activity_category' => :'String',
111
+
112
+ :'is_out_of_office' => :'BOOLEAN',
113
+
114
+ :'adherence_state' => :'String',
115
+
116
+ :'impact' => :'String',
117
+
118
+ :'adherence_change_time' => :'DateTime',
119
+
120
+ :'presence_update_time' => :'DateTime',
121
+
122
+ :'active_queues' => :'Array<WfmUserScheduleAdherenceUpdatedTeamTopicQueueReference>',
123
+
124
+ :'active_queues_modified_time' => :'DateTime',
125
+
126
+ :'removed_from_management_unit' => :'BOOLEAN'
127
+
128
+ }
129
+ end
130
+
131
+ # Initializes the object
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ def initialize(attributes = {})
134
+ return unless attributes.is_a?(Hash)
135
+
136
+ # convert string to symbol for hash key
137
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
138
+
139
+
140
+ if attributes.has_key?(:'user')
141
+
142
+
143
+ self.user = attributes[:'user']
144
+
145
+
146
+ end
147
+
148
+
149
+ if attributes.has_key?(:'managementUnitId')
150
+
151
+
152
+ self.management_unit_id = attributes[:'managementUnitId']
153
+
154
+
155
+ end
156
+
157
+
158
+ if attributes.has_key?(:'team')
159
+
160
+
161
+ self.team = attributes[:'team']
162
+
163
+
164
+ end
165
+
166
+
167
+ if attributes.has_key?(:'scheduledActivityCategory')
168
+
169
+
170
+ self.scheduled_activity_category = attributes[:'scheduledActivityCategory']
171
+
172
+
173
+ end
174
+
175
+
176
+ if attributes.has_key?(:'systemPresence')
177
+
178
+
179
+ self.system_presence = attributes[:'systemPresence']
180
+
181
+
182
+ end
183
+
184
+
185
+ if attributes.has_key?(:'organizationSecondaryPresenceId')
186
+
187
+
188
+ self.organization_secondary_presence_id = attributes[:'organizationSecondaryPresenceId']
189
+
190
+
191
+ end
192
+
193
+
194
+ if attributes.has_key?(:'routingStatus')
195
+
196
+
197
+ self.routing_status = attributes[:'routingStatus']
198
+
199
+
200
+ end
201
+
202
+
203
+ if attributes.has_key?(:'actualActivityCategory')
204
+
205
+
206
+ self.actual_activity_category = attributes[:'actualActivityCategory']
207
+
208
+
209
+ end
210
+
211
+
212
+ if attributes.has_key?(:'isOutOfOffice')
213
+
214
+
215
+ self.is_out_of_office = attributes[:'isOutOfOffice']
216
+
217
+
218
+ end
219
+
220
+
221
+ if attributes.has_key?(:'adherenceState')
222
+
223
+
224
+ self.adherence_state = attributes[:'adherenceState']
225
+
226
+
227
+ end
228
+
229
+
230
+ if attributes.has_key?(:'impact')
231
+
232
+
233
+ self.impact = attributes[:'impact']
234
+
235
+
236
+ end
237
+
238
+
239
+ if attributes.has_key?(:'adherenceChangeTime')
240
+
241
+
242
+ self.adherence_change_time = attributes[:'adherenceChangeTime']
243
+
244
+
245
+ end
246
+
247
+
248
+ if attributes.has_key?(:'presenceUpdateTime')
249
+
250
+
251
+ self.presence_update_time = attributes[:'presenceUpdateTime']
252
+
253
+
254
+ end
255
+
256
+
257
+ if attributes.has_key?(:'activeQueues')
258
+
259
+ if (value = attributes[:'activeQueues']).is_a?(Array)
260
+ self.active_queues = value
261
+ end
262
+
263
+
264
+
265
+ end
266
+
267
+
268
+ if attributes.has_key?(:'activeQueuesModifiedTime')
269
+
270
+
271
+ self.active_queues_modified_time = attributes[:'activeQueuesModifiedTime']
272
+
273
+
274
+ end
275
+
276
+
277
+ if attributes.has_key?(:'removedFromManagementUnit')
278
+
279
+
280
+ self.removed_from_management_unit = attributes[:'removedFromManagementUnit']
281
+
282
+
283
+ end
284
+
285
+
286
+ end
287
+
288
+ # Show invalid properties with the reasons. Usually used together with valid?
289
+ # @return Array for valid properies with the reasons
290
+ def list_invalid_properties
291
+ invalid_properties = Array.new
292
+
293
+
294
+ return invalid_properties
295
+ end
296
+
297
+ # Check to see if the all the properties in the model are valid
298
+ # @return true if the model is valid
299
+ def valid?
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
+ allowed_values = ["__EMPTY__", "OFF_QUEUE", "IDLE", "INTERACTING", "NOT_RESPONDING", "COMMUNICATING", "OFFLINE"]
328
+ if @routing_status && !allowed_values.include?(@routing_status)
329
+ return false
330
+ end
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+ allowed_values = ["InAdherence", "OutOfAdherence", "Unscheduled", "Unknown", "Ignored"]
345
+ if @adherence_state && !allowed_values.include?(@adherence_state)
346
+ return false
347
+ end
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+ end
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+ # Custom attribute writer method checking allowed values (enum).
410
+ # @param [Object] routing_status Object to be assigned
411
+ def routing_status=(routing_status)
412
+ allowed_values = ["__EMPTY__", "OFF_QUEUE", "IDLE", "INTERACTING", "NOT_RESPONDING", "COMMUNICATING", "OFFLINE"]
413
+ if routing_status && !allowed_values.include?(routing_status)
414
+ fail ArgumentError, "invalid value for 'routing_status', must be one of #{allowed_values}."
415
+ end
416
+ @routing_status = routing_status
417
+ end
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+ # Custom attribute writer method checking allowed values (enum).
434
+ # @param [Object] adherence_state Object to be assigned
435
+ def adherence_state=(adherence_state)
436
+ allowed_values = ["InAdherence", "OutOfAdherence", "Unscheduled", "Unknown", "Ignored"]
437
+ if adherence_state && !allowed_values.include?(adherence_state)
438
+ fail ArgumentError, "invalid value for 'adherence_state', must be one of #{allowed_values}."
439
+ end
440
+ @adherence_state = adherence_state
441
+ end
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+ # Checks equality by comparing each attribute.
477
+ # @param [Object] Object to be compared
478
+ def ==(o)
479
+ return true if self.equal?(o)
480
+ self.class == o.class &&
481
+ user == o.user &&
482
+ management_unit_id == o.management_unit_id &&
483
+ team == o.team &&
484
+ scheduled_activity_category == o.scheduled_activity_category &&
485
+ system_presence == o.system_presence &&
486
+ organization_secondary_presence_id == o.organization_secondary_presence_id &&
487
+ routing_status == o.routing_status &&
488
+ actual_activity_category == o.actual_activity_category &&
489
+ is_out_of_office == o.is_out_of_office &&
490
+ adherence_state == o.adherence_state &&
491
+ impact == o.impact &&
492
+ adherence_change_time == o.adherence_change_time &&
493
+ presence_update_time == o.presence_update_time &&
494
+ active_queues == o.active_queues &&
495
+ active_queues_modified_time == o.active_queues_modified_time &&
496
+ removed_from_management_unit == o.removed_from_management_unit
497
+ end
498
+
499
+ # @see the `==` method
500
+ # @param [Object] Object to be compared
501
+ def eql?(o)
502
+ self == o
503
+ end
504
+
505
+ # Calculates hash code according to all attributes.
506
+ # @return [Fixnum] Hash code
507
+ def hash
508
+ [user, management_unit_id, team, scheduled_activity_category, system_presence, organization_secondary_presence_id, routing_status, actual_activity_category, is_out_of_office, adherence_state, impact, adherence_change_time, presence_update_time, active_queues, active_queues_modified_time, removed_from_management_unit].hash
509
+ end
510
+
511
+ # build the object from hash
512
+ def build_from_hash(attributes)
513
+ return nil unless attributes.is_a?(Hash)
514
+ self.class.swagger_types.each_pair do |key, type|
515
+ if type =~ /^Array<(.*)>/i
516
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
517
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
518
+ else
519
+ #TODO show warning in debug mode
520
+ end
521
+ elsif !attributes[self.class.attribute_map[key]].nil?
522
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
523
+ else
524
+ # data not found in attributes(hash), not an issue as the data can be optional
525
+ end
526
+ end
527
+
528
+ self
529
+ end
530
+
531
+ def _deserialize(type, value)
532
+ case type.to_sym
533
+ when :DateTime
534
+ DateTime.parse(value)
535
+ when :Date
536
+ Date.parse(value)
537
+ when :String
538
+ value.to_s
539
+ when :Integer
540
+ value.to_i
541
+ when :Float
542
+ value.to_f
543
+ when :BOOLEAN
544
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
545
+ true
546
+ else
547
+ false
548
+ end
549
+ when :Object
550
+ # generic object (usually a Hash), return directly
551
+ value
552
+ when /\AArray<(?<inner_type>.+)>\z/
553
+ inner_type = Regexp.last_match[:inner_type]
554
+ value.map { |v| _deserialize(inner_type, v) }
555
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
556
+ k_type = Regexp.last_match[:k_type]
557
+ v_type = Regexp.last_match[:v_type]
558
+ {}.tap do |hash|
559
+ value.each do |k, v|
560
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
561
+ end
562
+ end
563
+ else # model
564
+ _model = Object.const_get("PureCloud").const_get(type).new
565
+ _model.build_from_hash(value)
566
+ end
567
+ end
568
+
569
+ def to_s
570
+ to_hash.to_s
571
+ end
572
+
573
+ # to_body is an alias to to_body (backward compatibility))
574
+ def to_body
575
+ to_hash
576
+ end
577
+
578
+ # return the object in the form of hash
579
+ def to_hash
580
+ hash = {}
581
+ self.class.attribute_map.each_pair do |attr, param|
582
+ value = self.send(attr)
583
+ next if value.nil?
584
+ hash[param] = _to_hash(value)
585
+ end
586
+ hash
587
+ end
588
+
589
+ # Method to output non-array value in the form of hash
590
+ # For object, use to_hash. Otherwise, just return the value
591
+ def _to_hash(value)
592
+ if value.is_a?(Array)
593
+ value.compact.map{ |v| _to_hash(v) }
594
+ elsif value.is_a?(Hash)
595
+ {}.tap do |hash|
596
+ value.each { |k, v| hash[k] = _to_hash(v) }
597
+ end
598
+ elsif value.respond_to? :to_hash
599
+ value.to_hash
600
+ else
601
+ value
602
+ end
603
+ end
604
+
605
+ end
606
+ end