purecloudplatformclientv2 86.0.0 → 87.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.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/AnalyticsEvaluation.md +1 -1
  4. data/docs/CoachingAnnotation.md +21 -0
  5. data/docs/CoachingAnnotationCreateRequest.md +14 -0
  6. data/docs/CoachingAnnotationList.md +22 -0
  7. data/docs/CoachingApi.md +1132 -0
  8. data/docs/CoachingAppointmentReference.md +14 -0
  9. data/docs/CoachingAppointmentResponse.md +27 -0
  10. data/docs/CoachingAppointmentResponseList.md +22 -0
  11. data/docs/CoachingAppointmentStatusDto.md +16 -0
  12. data/docs/CoachingAppointmentStatusDtoList.md +17 -0
  13. data/docs/CoachingNotification.md +23 -0
  14. data/docs/CoachingNotificationList.md +22 -0
  15. data/docs/ConversationEventTopicCall.md +1 -0
  16. data/docs/ConversationEventTopicCallback.md +1 -0
  17. data/docs/ConversationEventTopicChat.md +1 -0
  18. data/docs/ConversationEventTopicCobrowse.md +1 -0
  19. data/docs/ConversationEventTopicEmail.md +1 -0
  20. data/docs/ConversationEventTopicMessage.md +1 -0
  21. data/docs/ConversationEventTopicScreenshare.md +1 -0
  22. data/docs/ConversationEventTopicSocialExpression.md +1 -0
  23. data/docs/ConversationEventTopicVideo.md +1 -0
  24. data/docs/ConversationReference.md +14 -0
  25. data/docs/CreateCoachingAppointmentRequest.md +20 -0
  26. data/docs/DocumentReference.md +14 -0
  27. data/docs/EntityListing.md +5 -1
  28. data/docs/QueueConversationEventTopicCall.md +1 -0
  29. data/docs/QueueConversationEventTopicCallback.md +1 -0
  30. data/docs/QueueConversationEventTopicChat.md +1 -0
  31. data/docs/QueueConversationEventTopicCobrowse.md +1 -0
  32. data/docs/QueueConversationEventTopicEmail.md +1 -0
  33. data/docs/QueueConversationEventTopicMessage.md +1 -0
  34. data/docs/QueueConversationEventTopicScreenshare.md +1 -0
  35. data/docs/QueueConversationEventTopicSocialExpression.md +1 -0
  36. data/docs/QueueConversationEventTopicVideo.md +1 -0
  37. data/docs/QueueConversationSocialExpressionEventTopicCall.md +1 -0
  38. data/docs/QueueConversationSocialExpressionEventTopicCallback.md +1 -0
  39. data/docs/QueueConversationSocialExpressionEventTopicChat.md +1 -0
  40. data/docs/QueueConversationSocialExpressionEventTopicCobrowse.md +1 -0
  41. data/docs/QueueConversationSocialExpressionEventTopicEmail.md +1 -0
  42. data/docs/QueueConversationSocialExpressionEventTopicMessage.md +1 -0
  43. data/docs/QueueConversationSocialExpressionEventTopicScreenshare.md +1 -0
  44. data/docs/QueueConversationSocialExpressionEventTopicSocialExpression.md +1 -0
  45. data/docs/QueueConversationSocialExpressionEventTopicVideo.md +1 -0
  46. data/docs/QueueConversationVideoEventTopicCall.md +1 -0
  47. data/docs/QueueConversationVideoEventTopicCallback.md +1 -0
  48. data/docs/QueueConversationVideoEventTopicChat.md +1 -0
  49. data/docs/QueueConversationVideoEventTopicCobrowse.md +1 -0
  50. data/docs/QueueConversationVideoEventTopicEmail.md +1 -0
  51. data/docs/QueueConversationVideoEventTopicMessage.md +1 -0
  52. data/docs/QueueConversationVideoEventTopicScreenshare.md +1 -0
  53. data/docs/QueueConversationVideoEventTopicSocialExpression.md +1 -0
  54. data/docs/QueueConversationVideoEventTopicVideo.md +1 -0
  55. data/docs/UpdateCoachingAppointmentRequest.md +18 -0
  56. data/docs/WemLearningAssignmentRuleRunTopicLearningAssignmentRuleRunNotification.md +14 -0
  57. data/docs/WemLearningAssignmentRuleRunTopicLearningModuleReference.md +14 -0
  58. data/docs/WemLearningAssignmentRuleRunTopicWemLearningAssignmentsCreated.md +13 -0
  59. data/docs/WemLearningAssignmentTopicLearningAssignmentNotification.md +22 -0
  60. data/docs/WemLearningAssignmentTopicLearningModuleReference.md +14 -0
  61. data/docs/WemLearningAssignmentTopicUserReference.md +13 -0
  62. data/lib/purecloudplatformclientv2.rb +21 -0
  63. data/lib/purecloudplatformclientv2/api/coaching_api.rb +1296 -0
  64. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  65. data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
  66. data/lib/purecloudplatformclientv2/models/coaching_annotation.rb +429 -0
  67. data/lib/purecloudplatformclientv2/models/coaching_annotation_create_request.rb +252 -0
  68. data/lib/purecloudplatformclientv2/models/coaching_annotation_list.rb +428 -0
  69. data/lib/purecloudplatformclientv2/models/coaching_appointment_reference.rb +228 -0
  70. data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +587 -0
  71. data/lib/purecloudplatformclientv2/models/coaching_appointment_response_list.rb +428 -0
  72. data/lib/purecloudplatformclientv2/models/coaching_appointment_status_dto.rb +299 -0
  73. data/lib/purecloudplatformclientv2/models/coaching_appointment_status_dto_list.rb +303 -0
  74. data/lib/purecloudplatformclientv2/models/coaching_notification.rb +504 -0
  75. data/lib/purecloudplatformclientv2/models/coaching_notification_list.rb +428 -0
  76. data/lib/purecloudplatformclientv2/models/conversation_chat.rb +2 -2
  77. data/lib/purecloudplatformclientv2/models/conversation_event_topic_call.rb +26 -1
  78. data/lib/purecloudplatformclientv2/models/conversation_event_topic_callback.rb +26 -1
  79. data/lib/purecloudplatformclientv2/models/conversation_event_topic_chat.rb +26 -1
  80. data/lib/purecloudplatformclientv2/models/conversation_event_topic_cobrowse.rb +26 -1
  81. data/lib/purecloudplatformclientv2/models/conversation_event_topic_email.rb +26 -1
  82. data/lib/purecloudplatformclientv2/models/conversation_event_topic_message.rb +26 -1
  83. data/lib/purecloudplatformclientv2/models/conversation_event_topic_screenshare.rb +26 -1
  84. data/lib/purecloudplatformclientv2/models/conversation_event_topic_social_expression.rb +26 -1
  85. data/lib/purecloudplatformclientv2/models/conversation_event_topic_video.rb +26 -1
  86. data/lib/purecloudplatformclientv2/models/conversation_reference.rb +228 -0
  87. data/lib/purecloudplatformclientv2/models/create_coaching_appointment_request.rb +426 -0
  88. data/lib/purecloudplatformclientv2/models/document_reference.rb +228 -0
  89. data/lib/purecloudplatformclientv2/models/entity_listing.rb +104 -4
  90. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_call.rb +26 -1
  91. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_callback.rb +26 -1
  92. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_chat.rb +26 -1
  93. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_cobrowse.rb +26 -1
  94. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_email.rb +26 -1
  95. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_message.rb +26 -1
  96. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_screenshare.rb +26 -1
  97. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_social_expression.rb +26 -1
  98. data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_video.rb +26 -1
  99. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_call.rb +26 -1
  100. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_callback.rb +26 -1
  101. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_chat.rb +26 -1
  102. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_cobrowse.rb +26 -1
  103. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_email.rb +26 -1
  104. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_message.rb +26 -1
  105. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_screenshare.rb +26 -1
  106. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_social_expression.rb +26 -1
  107. data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_video.rb +26 -1
  108. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_call.rb +26 -1
  109. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_callback.rb +26 -1
  110. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_chat.rb +26 -1
  111. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_cobrowse.rb +26 -1
  112. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_email.rb +26 -1
  113. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_message.rb +26 -1
  114. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_screenshare.rb +26 -1
  115. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_social_expression.rb +26 -1
  116. data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_video.rb +26 -1
  117. data/lib/purecloudplatformclientv2/models/update_coaching_appointment_request.rb +337 -0
  118. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_rule_run_topic_learning_assignment_rule_run_notification.rb +228 -0
  119. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_rule_run_topic_learning_module_reference.rb +226 -0
  120. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_rule_run_topic_wem_learning_assignments_created.rb +201 -0
  121. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_topic_learning_assignment_notification.rb +440 -0
  122. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_topic_learning_module_reference.rb +226 -0
  123. data/lib/purecloudplatformclientv2/models/wem_learning_assignment_topic_user_reference.rb +201 -0
  124. data/lib/purecloudplatformclientv2/version.rb +1 -1
  125. metadata +44 -2
@@ -0,0 +1,303 @@
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 CoachingAppointmentStatusDtoList
21
+ attr_accessor :entities
22
+
23
+ attr_accessor :page_size
24
+
25
+ attr_accessor :page_number
26
+
27
+ attr_accessor :total
28
+
29
+ attr_accessor :page_count
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+
35
+ :'entities' => :'entities',
36
+
37
+ :'page_size' => :'pageSize',
38
+
39
+ :'page_number' => :'pageNumber',
40
+
41
+ :'total' => :'total',
42
+
43
+ :'page_count' => :'pageCount'
44
+
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+
52
+ :'entities' => :'Array<CoachingAppointmentStatusDto>',
53
+
54
+ :'page_size' => :'Integer',
55
+
56
+ :'page_number' => :'Integer',
57
+
58
+ :'total' => :'Integer',
59
+
60
+ :'page_count' => :'Integer'
61
+
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ return unless attributes.is_a?(Hash)
69
+
70
+ # convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
72
+
73
+
74
+ if attributes.has_key?(:'entities')
75
+
76
+ if (value = attributes[:'entities']).is_a?(Array)
77
+ self.entities = value
78
+ end
79
+
80
+
81
+
82
+ end
83
+
84
+
85
+ if attributes.has_key?(:'pageSize')
86
+
87
+
88
+ self.page_size = attributes[:'pageSize']
89
+
90
+
91
+ end
92
+
93
+
94
+ if attributes.has_key?(:'pageNumber')
95
+
96
+
97
+ self.page_number = attributes[:'pageNumber']
98
+
99
+
100
+ end
101
+
102
+
103
+ if attributes.has_key?(:'total')
104
+
105
+
106
+ self.total = attributes[:'total']
107
+
108
+
109
+ end
110
+
111
+
112
+ if attributes.has_key?(:'pageCount')
113
+
114
+
115
+ self.page_count = attributes[:'pageCount']
116
+
117
+
118
+ end
119
+
120
+
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properies with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = Array.new
127
+
128
+
129
+ return invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ end
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] Object to be compared
186
+ def ==(o)
187
+ return true if self.equal?(o)
188
+ self.class == o.class &&
189
+ entities == o.entities &&
190
+ page_size == o.page_size &&
191
+ page_number == o.page_number &&
192
+ total == o.total &&
193
+ page_count == o.page_count
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Fixnum] Hash code
204
+ def hash
205
+ [entities, page_size, page_number, total, page_count].hash
206
+ end
207
+
208
+ # build the object from hash
209
+ def build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ self.class.swagger_types.each_pair do |key, type|
212
+ if type =~ /^Array<(.*)>/i
213
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
214
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
215
+ else
216
+ #TODO show warning in debug mode
217
+ end
218
+ elsif !attributes[self.class.attribute_map[key]].nil?
219
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
220
+ else
221
+ # data not found in attributes(hash), not an issue as the data can be optional
222
+ end
223
+ end
224
+
225
+ self
226
+ end
227
+
228
+ def _deserialize(type, value)
229
+ case type.to_sym
230
+ when :DateTime
231
+ DateTime.parse(value)
232
+ when :Date
233
+ Date.parse(value)
234
+ when :String
235
+ value.to_s
236
+ when :Integer
237
+ value.to_i
238
+ when :Float
239
+ value.to_f
240
+ when :BOOLEAN
241
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
242
+ true
243
+ else
244
+ false
245
+ end
246
+ when :Object
247
+ # generic object (usually a Hash), return directly
248
+ value
249
+ when /\AArray<(?<inner_type>.+)>\z/
250
+ inner_type = Regexp.last_match[:inner_type]
251
+ value.map { |v| _deserialize(inner_type, v) }
252
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
253
+ k_type = Regexp.last_match[:k_type]
254
+ v_type = Regexp.last_match[:v_type]
255
+ {}.tap do |hash|
256
+ value.each do |k, v|
257
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
258
+ end
259
+ end
260
+ else # model
261
+ _model = Object.const_get("PureCloud").const_get(type).new
262
+ _model.build_from_hash(value)
263
+ end
264
+ end
265
+
266
+ def to_s
267
+ to_hash.to_s
268
+ end
269
+
270
+ # to_body is an alias to to_body (backward compatibility))
271
+ def to_body
272
+ to_hash
273
+ end
274
+
275
+ # return the object in the form of hash
276
+ def to_hash
277
+ hash = {}
278
+ self.class.attribute_map.each_pair do |attr, param|
279
+ value = self.send(attr)
280
+ next if value.nil?
281
+ hash[param] = _to_hash(value)
282
+ end
283
+ hash
284
+ end
285
+
286
+ # Method to output non-array value in the form of hash
287
+ # For object, use to_hash. Otherwise, just return the value
288
+ def _to_hash(value)
289
+ if value.is_a?(Array)
290
+ value.compact.map{ |v| _to_hash(v) }
291
+ elsif value.is_a?(Hash)
292
+ {}.tap do |hash|
293
+ value.each { |k, v| hash[k] = _to_hash(v) }
294
+ end
295
+ elsif value.respond_to? :to_hash
296
+ value.to_hash
297
+ else
298
+ value
299
+ end
300
+ end
301
+
302
+ end
303
+ end
@@ -0,0 +1,504 @@
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 CoachingNotification
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ # The name of the appointment for this notification.
25
+ attr_accessor :name
26
+
27
+ # Indicates if notification is read or unread
28
+ attr_accessor :marked_as_read
29
+
30
+ # Action causing the notification.
31
+ attr_accessor :action_type
32
+
33
+ # The relationship of this user to this notification's appointment
34
+ attr_accessor :relationship
35
+
36
+ # The start time of the appointment relating to this notification. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
37
+ attr_accessor :date_start
38
+
39
+ # The duration of the appointment on this notification
40
+ attr_accessor :length_in_minutes
41
+
42
+ # The status of the appointment for this notification
43
+ attr_accessor :status
44
+
45
+ # The user of this notification
46
+ attr_accessor :user
47
+
48
+ # The appointment
49
+ attr_accessor :appointment
50
+
51
+ # The URI for this object
52
+ attr_accessor :self_uri
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+
58
+ :'id' => :'id',
59
+
60
+ :'name' => :'name',
61
+
62
+ :'marked_as_read' => :'markedAsRead',
63
+
64
+ :'action_type' => :'actionType',
65
+
66
+ :'relationship' => :'relationship',
67
+
68
+ :'date_start' => :'dateStart',
69
+
70
+ :'length_in_minutes' => :'lengthInMinutes',
71
+
72
+ :'status' => :'status',
73
+
74
+ :'user' => :'user',
75
+
76
+ :'appointment' => :'appointment',
77
+
78
+ :'self_uri' => :'selfUri'
79
+
80
+ }
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.swagger_types
85
+ {
86
+
87
+ :'id' => :'String',
88
+
89
+ :'name' => :'String',
90
+
91
+ :'marked_as_read' => :'BOOLEAN',
92
+
93
+ :'action_type' => :'String',
94
+
95
+ :'relationship' => :'String',
96
+
97
+ :'date_start' => :'DateTime',
98
+
99
+ :'length_in_minutes' => :'Integer',
100
+
101
+ :'status' => :'String',
102
+
103
+ :'user' => :'UserReference',
104
+
105
+ :'appointment' => :'CoachingAppointmentReference',
106
+
107
+ :'self_uri' => :'String'
108
+
109
+ }
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ return unless attributes.is_a?(Hash)
116
+
117
+ # convert string to symbol for hash key
118
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
119
+
120
+
121
+ if attributes.has_key?(:'id')
122
+
123
+
124
+ self.id = attributes[:'id']
125
+
126
+
127
+ end
128
+
129
+
130
+ if attributes.has_key?(:'name')
131
+
132
+
133
+ self.name = attributes[:'name']
134
+
135
+
136
+ end
137
+
138
+
139
+ if attributes.has_key?(:'markedAsRead')
140
+
141
+
142
+ self.marked_as_read = attributes[:'markedAsRead']
143
+
144
+
145
+ end
146
+
147
+
148
+ if attributes.has_key?(:'actionType')
149
+
150
+
151
+ self.action_type = attributes[:'actionType']
152
+
153
+
154
+ end
155
+
156
+
157
+ if attributes.has_key?(:'relationship')
158
+
159
+
160
+ self.relationship = attributes[:'relationship']
161
+
162
+
163
+ end
164
+
165
+
166
+ if attributes.has_key?(:'dateStart')
167
+
168
+
169
+ self.date_start = attributes[:'dateStart']
170
+
171
+
172
+ end
173
+
174
+
175
+ if attributes.has_key?(:'lengthInMinutes')
176
+
177
+
178
+ self.length_in_minutes = attributes[:'lengthInMinutes']
179
+
180
+
181
+ end
182
+
183
+
184
+ if attributes.has_key?(:'status')
185
+
186
+
187
+ self.status = attributes[:'status']
188
+
189
+
190
+ end
191
+
192
+
193
+ if attributes.has_key?(:'user')
194
+
195
+
196
+ self.user = attributes[:'user']
197
+
198
+
199
+ end
200
+
201
+
202
+ if attributes.has_key?(:'appointment')
203
+
204
+
205
+ self.appointment = attributes[:'appointment']
206
+
207
+
208
+ end
209
+
210
+
211
+ if attributes.has_key?(:'selfUri')
212
+
213
+
214
+ self.self_uri = attributes[:'selfUri']
215
+
216
+
217
+ end
218
+
219
+
220
+ end
221
+
222
+ # Show invalid properties with the reasons. Usually used together with valid?
223
+ # @return Array for valid properies with the reasons
224
+ def list_invalid_properties
225
+ invalid_properties = Array.new
226
+
227
+
228
+ return invalid_properties
229
+ end
230
+
231
+ # Check to see if the all the properties in the model are valid
232
+ # @return true if the model is valid
233
+ def valid?
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ allowed_values = ["Create", "Update", "Delete", "StatusChange"]
250
+ if @action_type && !allowed_values.include?(@action_type)
251
+ return false
252
+ end
253
+
254
+
255
+
256
+
257
+
258
+ allowed_values = ["Attendee", "Creator", "Facilitator"]
259
+ if @relationship && !allowed_values.include?(@relationship)
260
+ return false
261
+ end
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ allowed_values = ["Scheduled", "InProgress", "Completed"]
276
+ if @status && !allowed_values.include?(@status)
277
+ return false
278
+ end
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+ end
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+ # Custom attribute writer method checking allowed values (enum).
314
+ # @param [Object] action_type Object to be assigned
315
+ def action_type=(action_type)
316
+ allowed_values = ["Create", "Update", "Delete", "StatusChange"]
317
+ if action_type && !allowed_values.include?(action_type)
318
+ fail ArgumentError, "invalid value for 'action_type', must be one of #{allowed_values}."
319
+ end
320
+ @action_type = action_type
321
+ end
322
+
323
+
324
+
325
+
326
+
327
+ # Custom attribute writer method checking allowed values (enum).
328
+ # @param [Object] relationship Object to be assigned
329
+ def relationship=(relationship)
330
+ allowed_values = ["Attendee", "Creator", "Facilitator"]
331
+ if relationship && !allowed_values.include?(relationship)
332
+ fail ArgumentError, "invalid value for 'relationship', must be one of #{allowed_values}."
333
+ end
334
+ @relationship = relationship
335
+ end
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ # Custom attribute writer method checking allowed values (enum).
352
+ # @param [Object] status Object to be assigned
353
+ def status=(status)
354
+ allowed_values = ["Scheduled", "InProgress", "Completed"]
355
+ if status && !allowed_values.include?(status)
356
+ fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
357
+ end
358
+ @status = status
359
+ end
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+ # Checks equality by comparing each attribute.
380
+ # @param [Object] Object to be compared
381
+ def ==(o)
382
+ return true if self.equal?(o)
383
+ self.class == o.class &&
384
+ id == o.id &&
385
+ name == o.name &&
386
+ marked_as_read == o.marked_as_read &&
387
+ action_type == o.action_type &&
388
+ relationship == o.relationship &&
389
+ date_start == o.date_start &&
390
+ length_in_minutes == o.length_in_minutes &&
391
+ status == o.status &&
392
+ user == o.user &&
393
+ appointment == o.appointment &&
394
+ self_uri == o.self_uri
395
+ end
396
+
397
+ # @see the `==` method
398
+ # @param [Object] Object to be compared
399
+ def eql?(o)
400
+ self == o
401
+ end
402
+
403
+ # Calculates hash code according to all attributes.
404
+ # @return [Fixnum] Hash code
405
+ def hash
406
+ [id, name, marked_as_read, action_type, relationship, date_start, length_in_minutes, status, user, appointment, self_uri].hash
407
+ end
408
+
409
+ # build the object from hash
410
+ def build_from_hash(attributes)
411
+ return nil unless attributes.is_a?(Hash)
412
+ self.class.swagger_types.each_pair do |key, type|
413
+ if type =~ /^Array<(.*)>/i
414
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
415
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
416
+ else
417
+ #TODO show warning in debug mode
418
+ end
419
+ elsif !attributes[self.class.attribute_map[key]].nil?
420
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
421
+ else
422
+ # data not found in attributes(hash), not an issue as the data can be optional
423
+ end
424
+ end
425
+
426
+ self
427
+ end
428
+
429
+ def _deserialize(type, value)
430
+ case type.to_sym
431
+ when :DateTime
432
+ DateTime.parse(value)
433
+ when :Date
434
+ Date.parse(value)
435
+ when :String
436
+ value.to_s
437
+ when :Integer
438
+ value.to_i
439
+ when :Float
440
+ value.to_f
441
+ when :BOOLEAN
442
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
443
+ true
444
+ else
445
+ false
446
+ end
447
+ when :Object
448
+ # generic object (usually a Hash), return directly
449
+ value
450
+ when /\AArray<(?<inner_type>.+)>\z/
451
+ inner_type = Regexp.last_match[:inner_type]
452
+ value.map { |v| _deserialize(inner_type, v) }
453
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
454
+ k_type = Regexp.last_match[:k_type]
455
+ v_type = Regexp.last_match[:v_type]
456
+ {}.tap do |hash|
457
+ value.each do |k, v|
458
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
459
+ end
460
+ end
461
+ else # model
462
+ _model = Object.const_get("PureCloud").const_get(type).new
463
+ _model.build_from_hash(value)
464
+ end
465
+ end
466
+
467
+ def to_s
468
+ to_hash.to_s
469
+ end
470
+
471
+ # to_body is an alias to to_body (backward compatibility))
472
+ def to_body
473
+ to_hash
474
+ end
475
+
476
+ # return the object in the form of hash
477
+ def to_hash
478
+ hash = {}
479
+ self.class.attribute_map.each_pair do |attr, param|
480
+ value = self.send(attr)
481
+ next if value.nil?
482
+ hash[param] = _to_hash(value)
483
+ end
484
+ hash
485
+ end
486
+
487
+ # Method to output non-array value in the form of hash
488
+ # For object, use to_hash. Otherwise, just return the value
489
+ def _to_hash(value)
490
+ if value.is_a?(Array)
491
+ value.compact.map{ |v| _to_hash(v) }
492
+ elsif value.is_a?(Hash)
493
+ {}.tap do |hash|
494
+ value.each { |k, v| hash[k] = _to_hash(v) }
495
+ end
496
+ elsif value.respond_to? :to_hash
497
+ value.to_hash
498
+ else
499
+ value
500
+ end
501
+ end
502
+
503
+ end
504
+ end