-
Notifications
You must be signed in to change notification settings - Fork 12
/
analyticsconversationsegment.go
247 lines (139 loc) · 6.84 KB
/
analyticsconversationsegment.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Analyticsconversationsegment
type Analyticsconversationsegment struct {
// AudioMuted - Flag indicating if audio is muted or not (true/false)
AudioMuted *bool `json:"audioMuted,omitempty"`
// Conference - Indicates whether the segment was a conference
Conference *bool `json:"conference,omitempty"`
// DestinationConversationId - The unique identifier of a new conversation when a conversation is ended for a conference
DestinationConversationId *string `json:"destinationConversationId,omitempty"`
// DestinationSessionId - The unique identifier of a new session when a session is ended for a conference
DestinationSessionId *string `json:"destinationSessionId,omitempty"`
// DisconnectType - The session disconnect type
DisconnectType *string `json:"disconnectType,omitempty"`
// ErrorCode - A code corresponding to the error that occurred
ErrorCode *string `json:"errorCode,omitempty"`
// GroupId - Unique identifier for a PureCloud group
GroupId *string `json:"groupId,omitempty"`
// Q850ResponseCodes - Q.850 response code(s)
Q850ResponseCodes *[]int `json:"q850ResponseCodes,omitempty"`
// QueueId - Queue identifier
QueueId *string `json:"queueId,omitempty"`
// RequestedLanguageId - Unique identifier for the language requested for an interaction
RequestedLanguageId *string `json:"requestedLanguageId,omitempty"`
// RequestedRoutingSkillIds - Unique identifier(s) for skill(s) requested for an interaction
RequestedRoutingSkillIds *[]string `json:"requestedRoutingSkillIds,omitempty"`
// RequestedRoutingUserIds - Unique identifier(s) for agent(s) requested for an interaction
RequestedRoutingUserIds *[]string `json:"requestedRoutingUserIds,omitempty"`
// SegmentEnd - The end time of a segment. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
SegmentEnd *time.Time `json:"segmentEnd,omitempty"`
// SegmentStart - The start time of a segment. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
SegmentStart *time.Time `json:"segmentStart,omitempty"`
// SegmentType - The activity that takes place in the segment, such as hold or interact
SegmentType *string `json:"segmentType,omitempty"`
// SipResponseCodes - SIP response code(s)
SipResponseCodes *[]int `json:"sipResponseCodes,omitempty"`
// SourceConversationId - The unique identifier of the previous conversation when a new conversation is created for a conference
SourceConversationId *string `json:"sourceConversationId,omitempty"`
// SourceSessionId - The unique identifier of the previous session when a new session is created for a conference
SourceSessionId *string `json:"sourceSessionId,omitempty"`
// Subject - The subject for the initial email that started this conversation
Subject *string `json:"subject,omitempty"`
// VideoMuted - Flag indicating if video is muted/paused or not (true/false)
VideoMuted *bool `json:"videoMuted,omitempty"`
// WrapUpCode - Wrap up code
WrapUpCode *string `json:"wrapUpCode,omitempty"`
// WrapUpNote - Note entered by an agent during after-call work
WrapUpNote *string `json:"wrapUpNote,omitempty"`
// WrapUpTags - Tag(s) assigned during after-call work
WrapUpTags *[]string `json:"wrapUpTags,omitempty"`
// ScoredAgents - Scored agents
ScoredAgents *[]Analyticsscoredagent `json:"scoredAgents,omitempty"`
// Properties - Additional segment properties
Properties *[]Analyticsproperty `json:"properties,omitempty"`
}
func (u *Analyticsconversationsegment) MarshalJSON() ([]byte, error) {
// Redundant initialization to avoid unused import errors for models with no Time values
_ = timeutil.Timedelta{}
type Alias Analyticsconversationsegment
SegmentEnd := new(string)
if u.SegmentEnd != nil {
*SegmentEnd = timeutil.Strftime(u.SegmentEnd, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
SegmentEnd = nil
}
SegmentStart := new(string)
if u.SegmentStart != nil {
*SegmentStart = timeutil.Strftime(u.SegmentStart, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
SegmentStart = nil
}
return json.Marshal(&struct {
AudioMuted *bool `json:"audioMuted,omitempty"`
Conference *bool `json:"conference,omitempty"`
DestinationConversationId *string `json:"destinationConversationId,omitempty"`
DestinationSessionId *string `json:"destinationSessionId,omitempty"`
DisconnectType *string `json:"disconnectType,omitempty"`
ErrorCode *string `json:"errorCode,omitempty"`
GroupId *string `json:"groupId,omitempty"`
Q850ResponseCodes *[]int `json:"q850ResponseCodes,omitempty"`
QueueId *string `json:"queueId,omitempty"`
RequestedLanguageId *string `json:"requestedLanguageId,omitempty"`
RequestedRoutingSkillIds *[]string `json:"requestedRoutingSkillIds,omitempty"`
RequestedRoutingUserIds *[]string `json:"requestedRoutingUserIds,omitempty"`
SegmentEnd *string `json:"segmentEnd,omitempty"`
SegmentStart *string `json:"segmentStart,omitempty"`
SegmentType *string `json:"segmentType,omitempty"`
SipResponseCodes *[]int `json:"sipResponseCodes,omitempty"`
SourceConversationId *string `json:"sourceConversationId,omitempty"`
SourceSessionId *string `json:"sourceSessionId,omitempty"`
Subject *string `json:"subject,omitempty"`
VideoMuted *bool `json:"videoMuted,omitempty"`
WrapUpCode *string `json:"wrapUpCode,omitempty"`
WrapUpNote *string `json:"wrapUpNote,omitempty"`
WrapUpTags *[]string `json:"wrapUpTags,omitempty"`
ScoredAgents *[]Analyticsscoredagent `json:"scoredAgents,omitempty"`
Properties *[]Analyticsproperty `json:"properties,omitempty"`
*Alias
}{
AudioMuted: u.AudioMuted,
Conference: u.Conference,
DestinationConversationId: u.DestinationConversationId,
DestinationSessionId: u.DestinationSessionId,
DisconnectType: u.DisconnectType,
ErrorCode: u.ErrorCode,
GroupId: u.GroupId,
Q850ResponseCodes: u.Q850ResponseCodes,
QueueId: u.QueueId,
RequestedLanguageId: u.RequestedLanguageId,
RequestedRoutingSkillIds: u.RequestedRoutingSkillIds,
RequestedRoutingUserIds: u.RequestedRoutingUserIds,
SegmentEnd: SegmentEnd,
SegmentStart: SegmentStart,
SegmentType: u.SegmentType,
SipResponseCodes: u.SipResponseCodes,
SourceConversationId: u.SourceConversationId,
SourceSessionId: u.SourceSessionId,
Subject: u.Subject,
VideoMuted: u.VideoMuted,
WrapUpCode: u.WrapUpCode,
WrapUpNote: u.WrapUpNote,
WrapUpTags: u.WrapUpTags,
ScoredAgents: u.ScoredAgents,
Properties: u.Properties,
Alias: (*Alias)(u),
})
}
// String returns a JSON representation of the model
func (o *Analyticsconversationsegment) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}