-
Notifications
You must be signed in to change notification settings - Fork 12
/
participantbasic.go
431 lines (237 loc) · 11.7 KB
/
participantbasic.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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
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
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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Participantbasic
type Participantbasic struct {
// Id - A globally unique identifier for this conversation.
Id *string `json:"id,omitempty"`
// StartTime - The timestamp when this participant joined the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
StartTime *time.Time `json:"startTime,omitempty"`
// EndTime - The timestamp when this participant disconnected from the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
EndTime *time.Time `json:"endTime,omitempty"`
// ConnectedTime - The timestamp when this participant was connected to the conversation in the provider clock. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
ConnectedTime *time.Time `json:"connectedTime,omitempty"`
// Name - A human readable name identifying the participant.
Name *string `json:"name,omitempty"`
// UserUri - If this participant represents a user, then this will be an URI that can be used to fetch the user.
UserUri *string `json:"userUri,omitempty"`
// UserId - If this participant represents a user, then this will be the globally unique identifier for the user.
UserId *string `json:"userId,omitempty"`
// ExternalContactId - If this participant represents an external contact, then this will be the globally unique identifier for the external contact.
ExternalContactId *string `json:"externalContactId,omitempty"`
// ExternalOrganizationId - If this participant represents an external org, then this will be the globally unique identifier for the external org.
ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"`
// QueueId - If present, the queue id that the communication channel came in on.
QueueId *string `json:"queueId,omitempty"`
// GroupId - If present, group of users the participant represents.
GroupId *string `json:"groupId,omitempty"`
// TeamId - The team id that this participant is a member of when added to the conversation.
TeamId *string `json:"teamId,omitempty"`
// QueueName - If present, the queue name that the communication channel came in on.
QueueName *string `json:"queueName,omitempty"`
// Purpose - A well known string that specifies the purpose of this participant.
Purpose *string `json:"purpose,omitempty"`
// ParticipantType - A well known string that specifies the type of this participant.
ParticipantType *string `json:"participantType,omitempty"`
// ConsultParticipantId - If this participant is part of a consult transfer, then this will be the participant id of the participant being transferred.
ConsultParticipantId *string `json:"consultParticipantId,omitempty"`
// Address - The address for the this participant. For a phone call this will be the ANI.
Address *string `json:"address,omitempty"`
// Ani - The address for the this participant. For a phone call this will be the ANI.
Ani *string `json:"ani,omitempty"`
// AniName - The ani-based name for this participant.
AniName *string `json:"aniName,omitempty"`
// Dnis - The address for the this participant. For a phone call this will be the ANI.
Dnis *string `json:"dnis,omitempty"`
// Locale - An ISO 639 language code specifying the locale for this participant
Locale *string `json:"locale,omitempty"`
// WrapupRequired - True iff this participant is required to enter wrapup for this conversation.
WrapupRequired *bool `json:"wrapupRequired,omitempty"`
// WrapupPrompt - This field controls how the UI prompts the agent for a wrapup.
WrapupPrompt *string `json:"wrapupPrompt,omitempty"`
// WrapupTimeoutMs - Specifies how long a timed ACW session will last.
WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"`
// WrapupSkipped - The UI sets this field when the agent chooses to skip entering a wrapup for this participant.
WrapupSkipped *bool `json:"wrapupSkipped,omitempty"`
// Wrapup - Call wrap up or disposition data.
Wrapup *Wrapup `json:"wrapup,omitempty"`
// ConversationRoutingData - Information on how a communication should be routed to an agent.
ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"`
// AlertingTimeoutMs - Specifies how long the agent has to answer an interaction before being marked as not responding.
AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"`
// MonitoredParticipantId - If this participant is a monitor, then this will be the id of the participant that is being monitored.
MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"`
// CoachedParticipantId - If this participant is a coach, then this will be the id of the participant that is being coached.
CoachedParticipantId *string `json:"coachedParticipantId,omitempty"`
// Attributes - Additional participant attributes
Attributes *map[string]string `json:"attributes,omitempty"`
// Calls
Calls *[]Callbasic `json:"calls,omitempty"`
// Callbacks
Callbacks *[]Callbackbasic `json:"callbacks,omitempty"`
// Chats
Chats *[]Conversationchat `json:"chats,omitempty"`
// Cobrowsesessions
Cobrowsesessions *[]Cobrowsesession `json:"cobrowsesessions,omitempty"`
// Emails
Emails *[]Email `json:"emails,omitempty"`
// Messages
Messages *[]Message `json:"messages,omitempty"`
// Screenshares
Screenshares *[]Screenshare `json:"screenshares,omitempty"`
// SocialExpressions
SocialExpressions *[]Socialexpression `json:"socialExpressions,omitempty"`
// Videos
Videos *[]Video `json:"videos,omitempty"`
// Evaluations
Evaluations *[]Evaluation `json:"evaluations,omitempty"`
// ScreenRecordingState - The current screen recording state for this participant.
ScreenRecordingState *string `json:"screenRecordingState,omitempty"`
// FlaggedReason - The reason specifying why participant flagged the conversation.
FlaggedReason *string `json:"flaggedReason,omitempty"`
// StartAcwTime - The timestamp when this participant started after-call work. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
StartAcwTime *time.Time `json:"startAcwTime,omitempty"`
// EndAcwTime - The timestamp when this participant ended after-call work. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
EndAcwTime *time.Time `json:"endAcwTime,omitempty"`
}
func (u *Participantbasic) MarshalJSON() ([]byte, error) {
// Redundant initialization to avoid unused import errors for models with no Time values
_ = timeutil.Timedelta{}
type Alias Participantbasic
StartTime := new(string)
if u.StartTime != nil {
*StartTime = timeutil.Strftime(u.StartTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
StartTime = nil
}
EndTime := new(string)
if u.EndTime != nil {
*EndTime = timeutil.Strftime(u.EndTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
EndTime = nil
}
ConnectedTime := new(string)
if u.ConnectedTime != nil {
*ConnectedTime = timeutil.Strftime(u.ConnectedTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
ConnectedTime = nil
}
StartAcwTime := new(string)
if u.StartAcwTime != nil {
*StartAcwTime = timeutil.Strftime(u.StartAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
StartAcwTime = nil
}
EndAcwTime := new(string)
if u.EndAcwTime != nil {
*EndAcwTime = timeutil.Strftime(u.EndAcwTime, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
EndAcwTime = nil
}
return json.Marshal(&struct {
Id *string `json:"id,omitempty"`
StartTime *string `json:"startTime,omitempty"`
EndTime *string `json:"endTime,omitempty"`
ConnectedTime *string `json:"connectedTime,omitempty"`
Name *string `json:"name,omitempty"`
UserUri *string `json:"userUri,omitempty"`
UserId *string `json:"userId,omitempty"`
ExternalContactId *string `json:"externalContactId,omitempty"`
ExternalOrganizationId *string `json:"externalOrganizationId,omitempty"`
QueueId *string `json:"queueId,omitempty"`
GroupId *string `json:"groupId,omitempty"`
TeamId *string `json:"teamId,omitempty"`
QueueName *string `json:"queueName,omitempty"`
Purpose *string `json:"purpose,omitempty"`
ParticipantType *string `json:"participantType,omitempty"`
ConsultParticipantId *string `json:"consultParticipantId,omitempty"`
Address *string `json:"address,omitempty"`
Ani *string `json:"ani,omitempty"`
AniName *string `json:"aniName,omitempty"`
Dnis *string `json:"dnis,omitempty"`
Locale *string `json:"locale,omitempty"`
WrapupRequired *bool `json:"wrapupRequired,omitempty"`
WrapupPrompt *string `json:"wrapupPrompt,omitempty"`
WrapupTimeoutMs *int `json:"wrapupTimeoutMs,omitempty"`
WrapupSkipped *bool `json:"wrapupSkipped,omitempty"`
Wrapup *Wrapup `json:"wrapup,omitempty"`
ConversationRoutingData *Conversationroutingdata `json:"conversationRoutingData,omitempty"`
AlertingTimeoutMs *int `json:"alertingTimeoutMs,omitempty"`
MonitoredParticipantId *string `json:"monitoredParticipantId,omitempty"`
CoachedParticipantId *string `json:"coachedParticipantId,omitempty"`
Attributes *map[string]string `json:"attributes,omitempty"`
Calls *[]Callbasic `json:"calls,omitempty"`
Callbacks *[]Callbackbasic `json:"callbacks,omitempty"`
Chats *[]Conversationchat `json:"chats,omitempty"`
Cobrowsesessions *[]Cobrowsesession `json:"cobrowsesessions,omitempty"`
Emails *[]Email `json:"emails,omitempty"`
Messages *[]Message `json:"messages,omitempty"`
Screenshares *[]Screenshare `json:"screenshares,omitempty"`
SocialExpressions *[]Socialexpression `json:"socialExpressions,omitempty"`
Videos *[]Video `json:"videos,omitempty"`
Evaluations *[]Evaluation `json:"evaluations,omitempty"`
ScreenRecordingState *string `json:"screenRecordingState,omitempty"`
FlaggedReason *string `json:"flaggedReason,omitempty"`
StartAcwTime *string `json:"startAcwTime,omitempty"`
EndAcwTime *string `json:"endAcwTime,omitempty"`
*Alias
}{
Id: u.Id,
StartTime: StartTime,
EndTime: EndTime,
ConnectedTime: ConnectedTime,
Name: u.Name,
UserUri: u.UserUri,
UserId: u.UserId,
ExternalContactId: u.ExternalContactId,
ExternalOrganizationId: u.ExternalOrganizationId,
QueueId: u.QueueId,
GroupId: u.GroupId,
TeamId: u.TeamId,
QueueName: u.QueueName,
Purpose: u.Purpose,
ParticipantType: u.ParticipantType,
ConsultParticipantId: u.ConsultParticipantId,
Address: u.Address,
Ani: u.Ani,
AniName: u.AniName,
Dnis: u.Dnis,
Locale: u.Locale,
WrapupRequired: u.WrapupRequired,
WrapupPrompt: u.WrapupPrompt,
WrapupTimeoutMs: u.WrapupTimeoutMs,
WrapupSkipped: u.WrapupSkipped,
Wrapup: u.Wrapup,
ConversationRoutingData: u.ConversationRoutingData,
AlertingTimeoutMs: u.AlertingTimeoutMs,
MonitoredParticipantId: u.MonitoredParticipantId,
CoachedParticipantId: u.CoachedParticipantId,
Attributes: u.Attributes,
Calls: u.Calls,
Callbacks: u.Callbacks,
Chats: u.Chats,
Cobrowsesessions: u.Cobrowsesessions,
Emails: u.Emails,
Messages: u.Messages,
Screenshares: u.Screenshares,
SocialExpressions: u.SocialExpressions,
Videos: u.Videos,
Evaluations: u.Evaluations,
ScreenRecordingState: u.ScreenRecordingState,
FlaggedReason: u.FlaggedReason,
StartAcwTime: StartAcwTime,
EndAcwTime: EndAcwTime,
Alias: (*Alias)(u),
})
}
// String returns a JSON representation of the model
func (o *Participantbasic) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}