-
Notifications
You must be signed in to change notification settings - Fork 13
/
queuerequest.go
472 lines (298 loc) · 14.5 KB
/
queuerequest.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
432
433
434
435
436
437
438
439
440
441
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
package platformclientv2
import (
"time"
"github.com/leekchan/timeutil"
"encoding/json"
"strconv"
"strings"
)
// Queuerequest
type Queuerequest struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Name - The queue name
Name *string `json:"name,omitempty"`
// Division - The division to which this entity belongs.
Division *Writabledivision `json:"division,omitempty"`
// Description - The queue description.
Description *string `json:"description,omitempty"`
// DateCreated - The date the queue was created. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
DateCreated *time.Time `json:"dateCreated,omitempty"`
// DateModified - The date of the last modification to the queue. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
DateModified *time.Time `json:"dateModified,omitempty"`
// ModifiedBy - The ID of the user that last modified the queue.
ModifiedBy *string `json:"modifiedBy,omitempty"`
// CreatedBy - The ID of the user that created the queue.
CreatedBy *string `json:"createdBy,omitempty"`
// MemberCount - The total number of members in the queue.
MemberCount *int `json:"memberCount,omitempty"`
// UserMemberCount - The number of user members (i.e., non-group members) in the queue.
UserMemberCount *int `json:"userMemberCount,omitempty"`
// JoinedMemberCount - The number of joined members in the queue.
JoinedMemberCount *int `json:"joinedMemberCount,omitempty"`
// MediaSettings - The media settings for the queue. Valid key values: CALL, CALLBACK, CHAT, EMAIL, MESSAGE, SOCIAL_EXPRESSION, VIDEO_COMM
MediaSettings *map[string]Mediasetting `json:"mediaSettings,omitempty"`
// RoutingRules - The routing rules for the queue, used for Preferred Agent Routing.
RoutingRules *[]Routingrule `json:"routingRules,omitempty"`
// Bullseye - The bullseye settings for the queue.
Bullseye *Bullseye `json:"bullseye,omitempty"`
// AcwSettings - The ACW settings for the queue.
AcwSettings *Acwsettings `json:"acwSettings,omitempty"`
// SkillEvaluationMethod - The skill evaluation method to use when routing conversations.
SkillEvaluationMethod *string `json:"skillEvaluationMethod,omitempty"`
// MemberGroups - The groups of agents associated with the queue, if any. Queue membership will update to match group membership changes.
MemberGroups *[]Membergroup `json:"memberGroups,omitempty"`
// QueueFlow - The in-queue flow to use for call conversations waiting in queue.
QueueFlow *Domainentityref `json:"queueFlow,omitempty"`
// EmailInQueueFlow - The in-queue flow to use for email conversations waiting in queue.
EmailInQueueFlow *Domainentityref `json:"emailInQueueFlow,omitempty"`
// MessageInQueueFlow - The in-queue flow to use for message conversations waiting in queue.
MessageInQueueFlow *Domainentityref `json:"messageInQueueFlow,omitempty"`
// WhisperPrompt - The prompt used for whisper on the queue, if configured.
WhisperPrompt *Domainentityref `json:"whisperPrompt,omitempty"`
// OnHoldPrompt - The audio to be played when calls on this queue are on hold. If not configured, the default on-hold music will play.
OnHoldPrompt *Domainentityref `json:"onHoldPrompt,omitempty"`
// AutoAnswerOnly - Specifies whether the configured whisper should play for all ACD calls, or only for those which are auto-answered.
AutoAnswerOnly *bool `json:"autoAnswerOnly,omitempty"`
// EnableTranscription - Indicates whether voice transcription is enabled for this queue.
EnableTranscription *bool `json:"enableTranscription,omitempty"`
// EnableManualAssignment - Indicates whether manual assignment is enabled for this queue.
EnableManualAssignment *bool `json:"enableManualAssignment,omitempty"`
// AgentOwnedRouting - The Agent Owned Routing settings for the queue
AgentOwnedRouting *Agentownedrouting `json:"agentOwnedRouting,omitempty"`
// CallingPartyName - The name to use for caller identification for outbound calls from this queue.
CallingPartyName *string `json:"callingPartyName,omitempty"`
// CallingPartyNumber - The phone number to use for caller identification for outbound calls from this queue.
CallingPartyNumber *string `json:"callingPartyNumber,omitempty"`
// DefaultScripts - The default script Ids for the communication types.
DefaultScripts *map[string]Script `json:"defaultScripts,omitempty"`
// OutboundMessagingAddresses - The messaging addresses for the queue.
OutboundMessagingAddresses *Queuemessagingaddresses `json:"outboundMessagingAddresses,omitempty"`
// OutboundEmailAddress
OutboundEmailAddress *Queueemailaddress `json:"outboundEmailAddress,omitempty"`
// PeerId - The ID of an associated external queue.
PeerId *string `json:"peerId,omitempty"`
// SelfUri - The URI for this object
SelfUri *string `json:"selfUri,omitempty"`
}
func (o *Queuerequest) MarshalJSON() ([]byte, error) {
// Redundant initialization to avoid unused import errors for models with no Time values
_ = timeutil.Timedelta{}
type Alias Queuerequest
DateCreated := new(string)
if o.DateCreated != nil {
*DateCreated = timeutil.Strftime(o.DateCreated, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
DateCreated = nil
}
DateModified := new(string)
if o.DateModified != nil {
*DateModified = timeutil.Strftime(o.DateModified, "%Y-%m-%dT%H:%M:%S.%fZ")
} else {
DateModified = nil
}
return json.Marshal(&struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Division *Writabledivision `json:"division,omitempty"`
Description *string `json:"description,omitempty"`
DateCreated *string `json:"dateCreated,omitempty"`
DateModified *string `json:"dateModified,omitempty"`
ModifiedBy *string `json:"modifiedBy,omitempty"`
CreatedBy *string `json:"createdBy,omitempty"`
MemberCount *int `json:"memberCount,omitempty"`
UserMemberCount *int `json:"userMemberCount,omitempty"`
JoinedMemberCount *int `json:"joinedMemberCount,omitempty"`
MediaSettings *map[string]Mediasetting `json:"mediaSettings,omitempty"`
RoutingRules *[]Routingrule `json:"routingRules,omitempty"`
Bullseye *Bullseye `json:"bullseye,omitempty"`
AcwSettings *Acwsettings `json:"acwSettings,omitempty"`
SkillEvaluationMethod *string `json:"skillEvaluationMethod,omitempty"`
MemberGroups *[]Membergroup `json:"memberGroups,omitempty"`
QueueFlow *Domainentityref `json:"queueFlow,omitempty"`
EmailInQueueFlow *Domainentityref `json:"emailInQueueFlow,omitempty"`
MessageInQueueFlow *Domainentityref `json:"messageInQueueFlow,omitempty"`
WhisperPrompt *Domainentityref `json:"whisperPrompt,omitempty"`
OnHoldPrompt *Domainentityref `json:"onHoldPrompt,omitempty"`
AutoAnswerOnly *bool `json:"autoAnswerOnly,omitempty"`
EnableTranscription *bool `json:"enableTranscription,omitempty"`
EnableManualAssignment *bool `json:"enableManualAssignment,omitempty"`
AgentOwnedRouting *Agentownedrouting `json:"agentOwnedRouting,omitempty"`
CallingPartyName *string `json:"callingPartyName,omitempty"`
CallingPartyNumber *string `json:"callingPartyNumber,omitempty"`
DefaultScripts *map[string]Script `json:"defaultScripts,omitempty"`
OutboundMessagingAddresses *Queuemessagingaddresses `json:"outboundMessagingAddresses,omitempty"`
OutboundEmailAddress *Queueemailaddress `json:"outboundEmailAddress,omitempty"`
PeerId *string `json:"peerId,omitempty"`
SelfUri *string `json:"selfUri,omitempty"`
*Alias
}{
Id: o.Id,
Name: o.Name,
Division: o.Division,
Description: o.Description,
DateCreated: DateCreated,
DateModified: DateModified,
ModifiedBy: o.ModifiedBy,
CreatedBy: o.CreatedBy,
MemberCount: o.MemberCount,
UserMemberCount: o.UserMemberCount,
JoinedMemberCount: o.JoinedMemberCount,
MediaSettings: o.MediaSettings,
RoutingRules: o.RoutingRules,
Bullseye: o.Bullseye,
AcwSettings: o.AcwSettings,
SkillEvaluationMethod: o.SkillEvaluationMethod,
MemberGroups: o.MemberGroups,
QueueFlow: o.QueueFlow,
EmailInQueueFlow: o.EmailInQueueFlow,
MessageInQueueFlow: o.MessageInQueueFlow,
WhisperPrompt: o.WhisperPrompt,
OnHoldPrompt: o.OnHoldPrompt,
AutoAnswerOnly: o.AutoAnswerOnly,
EnableTranscription: o.EnableTranscription,
EnableManualAssignment: o.EnableManualAssignment,
AgentOwnedRouting: o.AgentOwnedRouting,
CallingPartyName: o.CallingPartyName,
CallingPartyNumber: o.CallingPartyNumber,
DefaultScripts: o.DefaultScripts,
OutboundMessagingAddresses: o.OutboundMessagingAddresses,
OutboundEmailAddress: o.OutboundEmailAddress,
PeerId: o.PeerId,
SelfUri: o.SelfUri,
Alias: (*Alias)(o),
})
}
func (o *Queuerequest) UnmarshalJSON(b []byte) error {
var QueuerequestMap map[string]interface{}
err := json.Unmarshal(b, &QueuerequestMap)
if err != nil {
return err
}
if Id, ok := QueuerequestMap["id"].(string); ok {
o.Id = &Id
}
if Name, ok := QueuerequestMap["name"].(string); ok {
o.Name = &Name
}
if Division, ok := QueuerequestMap["division"].(map[string]interface{}); ok {
DivisionString, _ := json.Marshal(Division)
json.Unmarshal(DivisionString, &o.Division)
}
if Description, ok := QueuerequestMap["description"].(string); ok {
o.Description = &Description
}
if dateCreatedString, ok := QueuerequestMap["dateCreated"].(string); ok {
DateCreated, _ := time.Parse("2006-01-02T15:04:05.999999Z", dateCreatedString)
o.DateCreated = &DateCreated
}
if dateModifiedString, ok := QueuerequestMap["dateModified"].(string); ok {
DateModified, _ := time.Parse("2006-01-02T15:04:05.999999Z", dateModifiedString)
o.DateModified = &DateModified
}
if ModifiedBy, ok := QueuerequestMap["modifiedBy"].(string); ok {
o.ModifiedBy = &ModifiedBy
}
if CreatedBy, ok := QueuerequestMap["createdBy"].(string); ok {
o.CreatedBy = &CreatedBy
}
if MemberCount, ok := QueuerequestMap["memberCount"].(float64); ok {
MemberCountInt := int(MemberCount)
o.MemberCount = &MemberCountInt
}
if UserMemberCount, ok := QueuerequestMap["userMemberCount"].(float64); ok {
UserMemberCountInt := int(UserMemberCount)
o.UserMemberCount = &UserMemberCountInt
}
if JoinedMemberCount, ok := QueuerequestMap["joinedMemberCount"].(float64); ok {
JoinedMemberCountInt := int(JoinedMemberCount)
o.JoinedMemberCount = &JoinedMemberCountInt
}
if MediaSettings, ok := QueuerequestMap["mediaSettings"].(map[string]interface{}); ok {
MediaSettingsString, _ := json.Marshal(MediaSettings)
json.Unmarshal(MediaSettingsString, &o.MediaSettings)
}
if RoutingRules, ok := QueuerequestMap["routingRules"].([]interface{}); ok {
RoutingRulesString, _ := json.Marshal(RoutingRules)
json.Unmarshal(RoutingRulesString, &o.RoutingRules)
}
if Bullseye, ok := QueuerequestMap["bullseye"].(map[string]interface{}); ok {
BullseyeString, _ := json.Marshal(Bullseye)
json.Unmarshal(BullseyeString, &o.Bullseye)
}
if AcwSettings, ok := QueuerequestMap["acwSettings"].(map[string]interface{}); ok {
AcwSettingsString, _ := json.Marshal(AcwSettings)
json.Unmarshal(AcwSettingsString, &o.AcwSettings)
}
if SkillEvaluationMethod, ok := QueuerequestMap["skillEvaluationMethod"].(string); ok {
o.SkillEvaluationMethod = &SkillEvaluationMethod
}
if MemberGroups, ok := QueuerequestMap["memberGroups"].([]interface{}); ok {
MemberGroupsString, _ := json.Marshal(MemberGroups)
json.Unmarshal(MemberGroupsString, &o.MemberGroups)
}
if QueueFlow, ok := QueuerequestMap["queueFlow"].(map[string]interface{}); ok {
QueueFlowString, _ := json.Marshal(QueueFlow)
json.Unmarshal(QueueFlowString, &o.QueueFlow)
}
if EmailInQueueFlow, ok := QueuerequestMap["emailInQueueFlow"].(map[string]interface{}); ok {
EmailInQueueFlowString, _ := json.Marshal(EmailInQueueFlow)
json.Unmarshal(EmailInQueueFlowString, &o.EmailInQueueFlow)
}
if MessageInQueueFlow, ok := QueuerequestMap["messageInQueueFlow"].(map[string]interface{}); ok {
MessageInQueueFlowString, _ := json.Marshal(MessageInQueueFlow)
json.Unmarshal(MessageInQueueFlowString, &o.MessageInQueueFlow)
}
if WhisperPrompt, ok := QueuerequestMap["whisperPrompt"].(map[string]interface{}); ok {
WhisperPromptString, _ := json.Marshal(WhisperPrompt)
json.Unmarshal(WhisperPromptString, &o.WhisperPrompt)
}
if OnHoldPrompt, ok := QueuerequestMap["onHoldPrompt"].(map[string]interface{}); ok {
OnHoldPromptString, _ := json.Marshal(OnHoldPrompt)
json.Unmarshal(OnHoldPromptString, &o.OnHoldPrompt)
}
if AutoAnswerOnly, ok := QueuerequestMap["autoAnswerOnly"].(bool); ok {
o.AutoAnswerOnly = &AutoAnswerOnly
}
if EnableTranscription, ok := QueuerequestMap["enableTranscription"].(bool); ok {
o.EnableTranscription = &EnableTranscription
}
if EnableManualAssignment, ok := QueuerequestMap["enableManualAssignment"].(bool); ok {
o.EnableManualAssignment = &EnableManualAssignment
}
if AgentOwnedRouting, ok := QueuerequestMap["agentOwnedRouting"].(map[string]interface{}); ok {
AgentOwnedRoutingString, _ := json.Marshal(AgentOwnedRouting)
json.Unmarshal(AgentOwnedRoutingString, &o.AgentOwnedRouting)
}
if CallingPartyName, ok := QueuerequestMap["callingPartyName"].(string); ok {
o.CallingPartyName = &CallingPartyName
}
if CallingPartyNumber, ok := QueuerequestMap["callingPartyNumber"].(string); ok {
o.CallingPartyNumber = &CallingPartyNumber
}
if DefaultScripts, ok := QueuerequestMap["defaultScripts"].(map[string]interface{}); ok {
DefaultScriptsString, _ := json.Marshal(DefaultScripts)
json.Unmarshal(DefaultScriptsString, &o.DefaultScripts)
}
if OutboundMessagingAddresses, ok := QueuerequestMap["outboundMessagingAddresses"].(map[string]interface{}); ok {
OutboundMessagingAddressesString, _ := json.Marshal(OutboundMessagingAddresses)
json.Unmarshal(OutboundMessagingAddressesString, &o.OutboundMessagingAddresses)
}
if OutboundEmailAddress, ok := QueuerequestMap["outboundEmailAddress"].(map[string]interface{}); ok {
OutboundEmailAddressString, _ := json.Marshal(OutboundEmailAddress)
json.Unmarshal(OutboundEmailAddressString, &o.OutboundEmailAddress)
}
if PeerId, ok := QueuerequestMap["peerId"].(string); ok {
o.PeerId = &PeerId
}
if SelfUri, ok := QueuerequestMap["selfUri"].(string); ok {
o.SelfUri = &SelfUri
}
return nil
}
// String returns a JSON representation of the model
func (o *Queuerequest) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}