purecloudplatformclientv2 58.0.0 → 58.0.1
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/ConversationCallEventTopicCallMediaParticipant.md +1 -0
- data/docs/ConversationCallEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationCallEventTopicScoredAgent.md +14 -0
- data/docs/ConversationCallbackEventTopicCallbackMediaParticipant.md +1 -0
- data/docs/ConversationCallbackEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationCallbackEventTopicScoredAgent.md +14 -0
- data/docs/ConversationChatEventTopicChatMediaParticipant.md +1 -0
- data/docs/ConversationChatEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationChatEventTopicScoredAgent.md +14 -0
- data/docs/ConversationCobrowseEventTopicCobrowseMediaParticipant.md +1 -0
- data/docs/ConversationCobrowseEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationCobrowseEventTopicScoredAgent.md +14 -0
- data/docs/ConversationEmailEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationEmailEventTopicEmailMediaParticipant.md +1 -0
- data/docs/ConversationEmailEventTopicScoredAgent.md +14 -0
- data/docs/ConversationEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationEventTopicParticipant.md +1 -0
- data/docs/ConversationEventTopicScoredAgent.md +14 -0
- data/docs/ConversationEventTopicUriReference.md +14 -0
- data/docs/ConversationMessageEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationMessageEventTopicMessageMediaParticipant.md +1 -0
- data/docs/ConversationMessageEventTopicScoredAgent.md +14 -0
- data/docs/ConversationScreenShareEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationScreenShareEventTopicScoredAgent.md +14 -0
- data/docs/ConversationScreenShareEventTopicScreenShareMediaParticipant.md +1 -0
- data/docs/ConversationSocialExpressionEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationSocialExpressionEventTopicScoredAgent.md +14 -0
- data/docs/ConversationSocialExpressionEventTopicSocialMediaParticipant.md +1 -0
- data/docs/ConversationVideoEventTopicConversationRoutingData.md +17 -0
- data/docs/ConversationVideoEventTopicScoredAgent.md +14 -0
- data/docs/ConversationVideoEventTopicVideoMediaParticipant.md +1 -0
- data/docs/QueueConversationCallEventTopicCallMediaParticipant.md +1 -0
- data/docs/QueueConversationCallEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationCallEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationCallbackEventTopicCallbackMediaParticipant.md +1 -0
- data/docs/QueueConversationCallbackEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationCallbackEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationChatEventTopicChatMediaParticipant.md +1 -0
- data/docs/QueueConversationChatEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationChatEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationCobrowseEventTopicCobrowseMediaParticipant.md +1 -0
- data/docs/QueueConversationCobrowseEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationCobrowseEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationEmailEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationEmailEventTopicEmailMediaParticipant.md +1 -0
- data/docs/QueueConversationEmailEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationEventTopicParticipant.md +1 -0
- data/docs/QueueConversationEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationEventTopicUriReference.md +14 -0
- data/docs/QueueConversationMessageEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationMessageEventTopicMessageMediaParticipant.md +1 -0
- data/docs/QueueConversationMessageEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationScreenShareEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationScreenShareEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationScreenShareEventTopicScreenShareMediaParticipant.md +1 -0
- data/docs/QueueConversationSocialExpressionEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationSocialExpressionEventTopicParticipant.md +1 -0
- data/docs/QueueConversationSocialExpressionEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationSocialExpressionEventTopicUriReference.md +14 -0
- data/docs/QueueConversationVideoEventTopicConversationRoutingData.md +17 -0
- data/docs/QueueConversationVideoEventTopicParticipant.md +1 -0
- data/docs/QueueConversationVideoEventTopicScoredAgent.md +14 -0
- data/docs/QueueConversationVideoEventTopicUriReference.md +14 -0
- data/lib/purecloudplatformclientv2.rb +44 -0
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/conversation_call_event_topic_call_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_call_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_call_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_callback_event_topic_callback_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_callback_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_callback_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_chat_event_topic_chat_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_chat_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_chat_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_cobrowse_event_topic_cobrowse_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_cobrowse_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_cobrowse_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_email_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_email_event_topic_email_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_email_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_message_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_message_event_topic_message_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_message_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_screen_share_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_screen_share_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_screen_share_event_topic_screen_share_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_social_expression_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_social_expression_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_social_expression_event_topic_social_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/conversation_video_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/conversation_video_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_video_event_topic_video_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_call_event_topic_call_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_call_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_call_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_callback_event_topic_callback_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_callback_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_callback_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_chat_event_topic_chat_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_chat_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_chat_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_cobrowse_event_topic_cobrowse_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_cobrowse_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_cobrowse_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_email_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_email_event_topic_email_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_email_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_message_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_message_event_topic_message_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_message_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_screen_share_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_screen_share_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_screen_share_event_topic_screen_share_media_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_conversation_routing_data.rb +305 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_participant.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_scored_agent.rb +226 -0
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +90 -2
@@ -52,6 +52,8 @@ module PureCloud
|
|
52
52
|
|
53
53
|
attr_accessor :wrapup
|
54
54
|
|
55
|
+
attr_accessor :conversation_routing_data
|
56
|
+
|
55
57
|
attr_accessor :alerting_timeout_ms
|
56
58
|
|
57
59
|
attr_accessor :monitored_participant_id
|
@@ -120,6 +122,8 @@ module PureCloud
|
|
120
122
|
|
121
123
|
:'wrapup' => :'wrapup',
|
122
124
|
|
125
|
+
:'conversation_routing_data' => :'conversationRoutingData',
|
126
|
+
|
123
127
|
:'alerting_timeout_ms' => :'alertingTimeoutMs',
|
124
128
|
|
125
129
|
:'monitored_participant_id' => :'monitoredParticipantId',
|
@@ -191,6 +195,8 @@ module PureCloud
|
|
191
195
|
|
192
196
|
:'wrapup' => :'ConversationEventTopicWrapup',
|
193
197
|
|
198
|
+
:'conversation_routing_data' => :'ConversationEventTopicConversationRoutingData',
|
199
|
+
|
194
200
|
:'alerting_timeout_ms' => :'Integer',
|
195
201
|
|
196
202
|
:'monitored_participant_id' => :'String',
|
@@ -386,6 +392,15 @@ module PureCloud
|
|
386
392
|
end
|
387
393
|
|
388
394
|
|
395
|
+
if attributes.has_key?(:'conversationRoutingData')
|
396
|
+
|
397
|
+
|
398
|
+
self.conversation_routing_data = attributes[:'conversationRoutingData']
|
399
|
+
|
400
|
+
|
401
|
+
end
|
402
|
+
|
403
|
+
|
389
404
|
if attributes.has_key?(:'alertingTimeoutMs')
|
390
405
|
|
391
406
|
|
@@ -629,6 +644,10 @@ module PureCloud
|
|
629
644
|
|
630
645
|
|
631
646
|
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
632
651
|
|
633
652
|
|
634
653
|
|
@@ -782,6 +801,11 @@ module PureCloud
|
|
782
801
|
|
783
802
|
|
784
803
|
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
|
785
809
|
|
786
810
|
|
787
811
|
|
@@ -883,6 +907,7 @@ module PureCloud
|
|
883
907
|
wrapup_prompt == o.wrapup_prompt &&
|
884
908
|
wrapup_timeout_ms == o.wrapup_timeout_ms &&
|
885
909
|
wrapup == o.wrapup &&
|
910
|
+
conversation_routing_data == o.conversation_routing_data &&
|
886
911
|
alerting_timeout_ms == o.alerting_timeout_ms &&
|
887
912
|
monitored_participant_id == o.monitored_participant_id &&
|
888
913
|
screen_recording_state == o.screen_recording_state &&
|
@@ -909,7 +934,7 @@ module PureCloud
|
|
909
934
|
# Calculates hash code according to all attributes.
|
910
935
|
# @return [Fixnum] Hash code
|
911
936
|
def hash
|
912
|
-
[id, connected_time, end_time, user_id, external_contact_id, external_organization_id, name, queue_id, group_id, purpose, consult_participant_id, address, wrapup_required, wrapup_expected, wrapup_prompt, wrapup_timeout_ms, wrapup, alerting_timeout_ms, monitored_participant_id, screen_recording_state, flagged_reason, attributes, calls, callbacks, chats, cobrowsesessions, emails, messages, screenshares, social_expressions, videos, additional_properties].hash
|
937
|
+
[id, connected_time, end_time, user_id, external_contact_id, external_organization_id, name, queue_id, group_id, purpose, consult_participant_id, address, wrapup_required, wrapup_expected, wrapup_prompt, wrapup_timeout_ms, wrapup, conversation_routing_data, alerting_timeout_ms, monitored_participant_id, screen_recording_state, flagged_reason, attributes, calls, callbacks, chats, cobrowsesessions, emails, messages, screenshares, social_expressions, videos, additional_properties].hash
|
913
938
|
end
|
914
939
|
|
915
940
|
# build the object from hash
|
@@ -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 ConversationEventTopicScoredAgent
|
21
|
+
attr_accessor :agent
|
22
|
+
|
23
|
+
attr_accessor :score
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
|
29
|
+
:'agent' => :'agent',
|
30
|
+
|
31
|
+
:'score' => :'score'
|
32
|
+
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
|
40
|
+
:'agent' => :'ConversationEventTopicUriReference',
|
41
|
+
|
42
|
+
:'score' => :'Integer'
|
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?(:'agent')
|
57
|
+
|
58
|
+
|
59
|
+
self.agent = attributes[:'agent']
|
60
|
+
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
if attributes.has_key?(:'score')
|
66
|
+
|
67
|
+
|
68
|
+
self.score = attributes[:'score']
|
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
|
+
agent == o.agent &&
|
116
|
+
score == o.score
|
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
|
+
[agent, score].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,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 ConversationEventTopicUriReference
|
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
|