vobiz-python 0.1.0__py3-none-any.whl

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 (63) hide show
  1. vobiz/__init__.py +4 -0
  2. vobiz/base.py +237 -0
  3. vobiz/exceptions.py +34 -0
  4. vobiz/resources/__init__.py +12 -0
  5. vobiz/resources/accounts.py +59 -0
  6. vobiz/resources/applications.py +138 -0
  7. vobiz/resources/calls_vobiz.py +206 -0
  8. vobiz/resources/cdrs.py +46 -0
  9. vobiz/resources/credentials.py +104 -0
  10. vobiz/resources/endpoints.py +101 -0
  11. vobiz/resources/ip_access_control_lists.py +100 -0
  12. vobiz/resources/numbers.py +134 -0
  13. vobiz/resources/origination_uris.py +109 -0
  14. vobiz/resources/recordings.py +91 -0
  15. vobiz/resources/sip_trunks.py +99 -0
  16. vobiz/resources/subaccounts.py +101 -0
  17. vobiz/rest/__init__.py +2 -0
  18. vobiz/rest/client.py +277 -0
  19. vobiz/utils/__init__.py +72 -0
  20. vobiz/utils/interactive.py +50 -0
  21. vobiz/utils/jwt.py +97 -0
  22. vobiz/utils/location.py +6 -0
  23. vobiz/utils/signature_v3.py +111 -0
  24. vobiz/utils/template.py +50 -0
  25. vobiz/utils/validators.py +280 -0
  26. vobiz/version.py +2 -0
  27. vobiz/xml/ConferenceElement.py +485 -0
  28. vobiz/xml/DTMFElement.py +41 -0
  29. vobiz/xml/DialElement.py +371 -0
  30. vobiz/xml/MultiPartyCallElement.py +711 -0
  31. vobiz/xml/ResponseElement.py +414 -0
  32. vobiz/xml/VobizXMLElement.py +48 -0
  33. vobiz/xml/__init__.py +31 -0
  34. vobiz/xml/breakElement.py +62 -0
  35. vobiz/xml/contElement.py +190 -0
  36. vobiz/xml/emphasisElement.py +174 -0
  37. vobiz/xml/getDigitsElement.py +294 -0
  38. vobiz/xml/getInputElement.py +369 -0
  39. vobiz/xml/hangupElement.py +57 -0
  40. vobiz/xml/langElement.py +197 -0
  41. vobiz/xml/messageElement.py +115 -0
  42. vobiz/xml/numberElement.py +77 -0
  43. vobiz/xml/pElement.py +164 -0
  44. vobiz/xml/phonemeElement.py +62 -0
  45. vobiz/xml/playElement.py +41 -0
  46. vobiz/xml/preAnswerElement.py +148 -0
  47. vobiz/xml/prosodyElement.py +227 -0
  48. vobiz/xml/recordElement.py +337 -0
  49. vobiz/xml/redirectElement.py +42 -0
  50. vobiz/xml/sElement.py +154 -0
  51. vobiz/xml/sayAsElement.py +61 -0
  52. vobiz/xml/speakElement.py +249 -0
  53. vobiz/xml/streamElement.py +123 -0
  54. vobiz/xml/subElement.py +43 -0
  55. vobiz/xml/userElement.py +79 -0
  56. vobiz/xml/wElement.py +144 -0
  57. vobiz/xml/waitElement.py +93 -0
  58. vobiz/xml/xmlUtils.py +6 -0
  59. vobiz_python-0.1.0.dist-info/METADATA +640 -0
  60. vobiz_python-0.1.0.dist-info/RECORD +63 -0
  61. vobiz_python-0.1.0.dist-info/WHEEL +5 -0
  62. vobiz_python-0.1.0.dist-info/licenses/LICENSE.txt +19 -0
  63. vobiz_python-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,711 @@
1
+ from vobiz.utils.validators import *
2
+ from vobiz.xml import VobizXMLElement, map_type
3
+
4
+
5
+ class MultiPartyCallElement(VobizXMLElement):
6
+ _name = 'MultiPartyCall'
7
+ _nestable = []
8
+
9
+ @property
10
+ def max_duration(self):
11
+ return self.__max_duration
12
+
13
+ @max_duration.setter
14
+ @validate_args(
15
+ max_duration=[
16
+ optional(
17
+ of_type_exact(int),
18
+ check(lambda max_duration: 300 <= max_duration <= 28800, '300 <= max_duration <= 28800')
19
+ )]
20
+ )
21
+ def max_duration(self, max_duration):
22
+ self.__max_duration = max_duration
23
+
24
+ def set_max_duration(self, max_duration):
25
+ self.max_duration = max_duration
26
+ return self
27
+
28
+ @property
29
+ def max_participants(self):
30
+ return self.__max_participants
31
+
32
+ @max_participants.setter
33
+ @validate_args(
34
+ max_participants=[
35
+ optional(
36
+ of_type_exact(int),
37
+ check(lambda max_participants: 2 <= max_participants <= 10, '2 <= max_participants <= 10')
38
+ )
39
+ ],
40
+ )
41
+ def max_participants(self, max_participants):
42
+ self.__max_participants = max_participants
43
+
44
+ def set_max_participants(self, max_participants):
45
+ self.max_participants = max_participants
46
+ return self
47
+
48
+ @property
49
+ def record_min_member_count(self):
50
+ return self.__record_min_member_count
51
+
52
+ @record_min_member_count.setter
53
+ @validate_args(
54
+ record_min_member_count=[
55
+ optional(
56
+ of_type_exact(int),
57
+ check(lambda record_min_member_count: 1 <= record_min_member_count <= 2, '1 <= record_min_member_count <= 2')
58
+ )
59
+ ],
60
+ )
61
+ def record_min_member_count(self, record_min_member_count):
62
+ self.__record_min_member_count = record_min_member_count
63
+
64
+ def set_record_min_member_count(self, record_min_member_count):
65
+ self.record_min_member_count = record_min_member_count
66
+ return self
67
+
68
+ @property
69
+ def wait_music_url(self):
70
+ return self.__wait_music_url
71
+
72
+ @wait_music_url.setter
73
+ @validate_args(wait_music_url=[optional(of_type_exact(str), is_url())])
74
+ def wait_music_url(self, wait_music_url):
75
+ self.__wait_music_url = wait_music_url
76
+
77
+ def set_wait_music_url(self, wait_music_url):
78
+ self.wait_music_url = wait_music_url
79
+ return self
80
+
81
+ @property
82
+ def wait_music_method(self):
83
+ return self.__wait_music_method
84
+
85
+ @wait_music_method.setter
86
+ @validate_args(wait_music_method=[optional(of_type_exact(str),
87
+ is_in(('GET', 'POST'), case_sensitive=False))])
88
+ def wait_music_method(self, wait_music_method):
89
+ self.__wait_music_method = wait_music_method
90
+
91
+ def set_wait_music_method(self, wait_music_method):
92
+ self.wait_music_method = wait_music_method
93
+ return self
94
+
95
+ @property
96
+ def wait_time(self):
97
+ return self.__wait_time
98
+
99
+ @wait_time.setter
100
+ @validate_args(
101
+ wait_time=[
102
+ optional(
103
+ of_type_exact(int),
104
+ check(lambda wait_time: 0 <= wait_time <= 1800, '0 <= wait_time <= 1800')
105
+ )
106
+ ],
107
+ )
108
+ def wait_time(self, wait_time):
109
+ self.__wait_time = wait_time
110
+
111
+ def set_wait_time(self, wait_time):
112
+ self.wait_time = wait_time
113
+ return self
114
+
115
+ @property
116
+ def agent_hold_music_url(self):
117
+ return self.__agent_hold_music_url
118
+
119
+ @agent_hold_music_url.setter
120
+ @validate_args(agent_hold_music_url=[optional(of_type_exact(str), is_url())])
121
+ def agent_hold_music_url(self, agent_hold_music_url):
122
+ self.__agent_hold_music_url = agent_hold_music_url
123
+
124
+ def set_agent_hold_music_url(self, agent_hold_music_url):
125
+ self.agent_hold_music_url = agent_hold_music_url
126
+ return self
127
+
128
+ @property
129
+ def agent_hold_music_method(self):
130
+ return self.__agent_hold_music_method
131
+
132
+ @agent_hold_music_method.setter
133
+ @validate_args(agent_hold_music_method=[optional(of_type_exact(str),
134
+ is_in(('GET', 'POST'), case_sensitive=False))])
135
+ def agent_hold_music_method(self, agent_hold_music_method):
136
+ self.__agent_hold_music_method = agent_hold_music_method
137
+
138
+ def set_agent_hold_music_method(self, agent_hold_music_method):
139
+ self.agent_hold_music_method = agent_hold_music_method
140
+ return self
141
+
142
+ @property
143
+ def customer_hold_music_url(self):
144
+ return self.__customer_hold_music_url
145
+
146
+ @customer_hold_music_url.setter
147
+ @validate_args(customer_hold_music_url=[optional(of_type_exact(str), is_url())])
148
+ def customer_hold_music_url(self, customer_hold_music_url):
149
+ self.__customer_hold_music_url = customer_hold_music_url
150
+
151
+ def set_customer_hold_music_url(self, customer_hold_music_url):
152
+ self.customer_hold_music_url = customer_hold_music_url
153
+ return self
154
+
155
+ @property
156
+ def customer_hold_music_method(self):
157
+ return self.__customer_hold_music_method
158
+
159
+ @customer_hold_music_method.setter
160
+ @validate_args(customer_hold_music_method=[optional(of_type_exact(str),
161
+ is_in(('GET', 'POST'), case_sensitive=False))])
162
+ def customer_hold_music_method(self, customer_hold_music_method):
163
+ self.__customer_hold_music_method = customer_hold_music_method
164
+
165
+ def set_customer_hold_music_method(self, customer_hold_music_method):
166
+ self.customer_hold_music_method = customer_hold_music_method
167
+ return self
168
+
169
+ @property
170
+ def record(self):
171
+ return self.__record
172
+
173
+ @record.setter
174
+ @validate_args(record=[optional(of_type_exact(bool))])
175
+ def record(self, record):
176
+ self.__record = record
177
+
178
+ def set_record(self, record):
179
+ self.record = record
180
+ return self
181
+
182
+ @property
183
+ def record_participant_track(self):
184
+ return self.__record_participant_track
185
+
186
+ @record_participant_track.setter
187
+ @validate_args(record_participant_track=[optional(of_type_exact(bool))])
188
+ def record_participant_track(self, record_participant_track):
189
+ self.__record_participant_track = record_participant_track
190
+
191
+ def set_record_participant_track(self, record_participant_track):
192
+ self.record_participant_track = record_participant_track
193
+ return self
194
+
195
+ @property
196
+ def record_file_format(self):
197
+ return self.__record_file_format
198
+
199
+ @record_file_format.setter
200
+ @validate_args(
201
+ record_file_format=[
202
+ optional(
203
+ of_type_exact(str),
204
+ is_in(('mp3', 'wav'), case_sensitive=False, case_type='lower')
205
+ )
206
+ ]
207
+ )
208
+ def record_file_format(self, record_file_format):
209
+ self.__record_file_format = record_file_format
210
+
211
+ def set_record_file_format(self, record_file_format):
212
+ self.record_file_format = record_file_format
213
+ return self
214
+
215
+ @property
216
+ def recording_callback_url(self):
217
+ return self.__recording_callback_url
218
+
219
+ @recording_callback_url.setter
220
+ @validate_args(recording_callback_url=[optional(of_type_exact(str), is_url())])
221
+ def recording_callback_url(self, recording_callback_url):
222
+ self.__recording_callback_url = recording_callback_url
223
+
224
+ def set_recording_callback_url(self, recording_callback_url):
225
+ self.recording_callback_url = recording_callback_url
226
+ return self
227
+
228
+ @property
229
+ def recording_callback_method(self):
230
+ return self.__recording_callback_method
231
+
232
+ @recording_callback_method.setter
233
+ @validate_args(recording_callback_method=[optional(of_type_exact(str),
234
+ is_in(('GET', 'POST'), case_sensitive=False))])
235
+ def recording_callback_method(self, recording_callback_method):
236
+ self.__recording_callback_method = recording_callback_method
237
+
238
+ def set_recording_callback_method(self, recording_callback_method):
239
+ self.recording_callback_method = recording_callback_method
240
+ return self
241
+
242
+ @property
243
+ def status_callback_events(self):
244
+ return self.__status_callback_events
245
+
246
+ @status_callback_events.setter
247
+ @validate_args(
248
+ status_callback_events=[
249
+ optional(
250
+ of_type_exact(str),
251
+ multi_is_in(('mpc-state-changes',
252
+ 'participant-state-changes',
253
+ 'participant-speak-events',
254
+ 'participant-digit-input-events',
255
+ 'add-participant-api-events'),
256
+ case_sensitive=False,
257
+ make_lower_case=True)
258
+ )
259
+ ]
260
+ )
261
+ def status_callback_events(self, status_callback_events):
262
+ self.__status_callback_events = status_callback_events
263
+
264
+ def set_status_callback_events(self, status_callback_events):
265
+ self.status_callback_events = status_callback_events
266
+ return self
267
+
268
+ @property
269
+ def status_callback_url(self):
270
+ return self.__status_callback_url
271
+
272
+ @status_callback_url.setter
273
+ @validate_args(status_callback_url=[optional(of_type_exact(str), is_url())])
274
+ def status_callback_url(self, status_callback_url):
275
+ self.__status_callback_url = status_callback_url
276
+
277
+ def set_status_callback_url(self, status_callback_url):
278
+ self.status_callback_url = status_callback_url
279
+ return self
280
+
281
+ @property
282
+ def start_recording_audio(self):
283
+ return self.__start_recording_audio
284
+
285
+ @start_recording_audio.setter
286
+ @validate_args(start_recording_audio=[optional(of_type_exact(str), is_url())])
287
+ def start_recording_audio(self, start_recording_audio):
288
+ self.__start_recording_audio = start_recording_audio
289
+
290
+ def set_start_recording_audio(self, start_recording_audio):
291
+ self.start_recording_audio = start_recording_audio
292
+ return self
293
+
294
+ @property
295
+ def start_recording_audio_method(self):
296
+ return self.__start_recording_audio_method
297
+
298
+ @start_recording_audio_method.setter
299
+ @validate_args(
300
+ start_recording_audio_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))])
301
+ def start_recording_audio_method(self, start_recording_audio_method):
302
+ self.__start_recording_audio_method = start_recording_audio_method
303
+
304
+ def set_start_recording_audio_method(self, start_recording_audio_method):
305
+ self.start_recording_audio_method = start_recording_audio_method
306
+ return self
307
+
308
+ @property
309
+ def stop_recording_audio(self):
310
+ return self.__stop_recording_audio
311
+
312
+ @stop_recording_audio.setter
313
+ @validate_args(stop_recording_audio=[optional(of_type_exact(str), is_url())])
314
+ def stop_recording_audio(self, stop_recording_audio):
315
+ self.__stop_recording_audio = stop_recording_audio
316
+
317
+ def set_stop_recording_audio(self, stop_recording_audio):
318
+ self.stop_recording_audio = stop_recording_audio
319
+ return self
320
+
321
+ @property
322
+ def stop_recording_audio_method(self):
323
+ return self.__stop_recording_audio_method
324
+
325
+ @stop_recording_audio_method.setter
326
+ @validate_args(
327
+ stop_recording_audio_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))])
328
+ def stop_recording_audio_method(self, stop_recording_audio_method):
329
+ self.__stop_recording_audio_method = stop_recording_audio_method
330
+
331
+ def set_stop_recording_audio_method(self, stop_recording_audio_method):
332
+ self.stop_recording_audio_method = stop_recording_audio_method
333
+ return self
334
+
335
+ @property
336
+ def status_callback_method(self):
337
+ return self.__status_callback_method
338
+
339
+ @status_callback_method.setter
340
+ @validate_args(status_callback_method=[optional(of_type_exact(str),
341
+ is_in(('GET', 'POST'), case_sensitive=False))])
342
+ def status_callback_method(self, status_callback_method):
343
+ self.__status_callback_method = status_callback_method
344
+
345
+ def set_status_callback_method(self, status_callback_method):
346
+ self.status_callback_method = status_callback_method
347
+ return self
348
+
349
+ @property
350
+ def stay_alone(self):
351
+ return self.__stay_alone
352
+
353
+ @stay_alone.setter
354
+ @validate_args(stay_alone=[optional(of_type_exact(bool))])
355
+ def stay_alone(self, stay_alone):
356
+ self.__stay_alone = stay_alone
357
+
358
+ def set_stay_alone(self, stay_alone):
359
+ self.stay_alone = stay_alone
360
+ return self
361
+
362
+ @property
363
+ def role(self):
364
+ return self.__role
365
+
366
+ @role.setter
367
+ @validate_args(
368
+ role=[
369
+ of_type_exact(str),
370
+ is_in(('ai-agent', 'agent', 'supervisor', 'customer'), case_sensitive=False, case_type='lower')
371
+ ]
372
+ )
373
+ def role(self, role):
374
+ self.__role = role
375
+
376
+ def set_role(self, role):
377
+ self.role = role
378
+ return self
379
+
380
+ @property
381
+ def coach_mode(self):
382
+ return self.__coach_mode
383
+
384
+ @coach_mode.setter
385
+ @validate_args(coach_mode=[optional(of_type_exact(bool))])
386
+ def coach_mode(self, coach_mode):
387
+ self.__coach_mode = coach_mode
388
+
389
+ def set_coach_mode(self, coach_mode):
390
+ self.coach_mode = coach_mode
391
+ return self
392
+
393
+ @property
394
+ def mute(self):
395
+ return self.__mute
396
+
397
+ @mute.setter
398
+ @validate_args(mute=[optional(of_type_exact(bool))])
399
+ def mute(self, mute):
400
+ self.__mute = mute
401
+
402
+ def set_mute(self, mute):
403
+ self.mute = mute
404
+ return self
405
+
406
+ @property
407
+ def hold(self):
408
+ return self.__hold
409
+
410
+ @hold.setter
411
+ @validate_args(hold=[optional(of_type_exact(bool))])
412
+ def hold(self, hold):
413
+ self.__hold = hold
414
+
415
+ def set_hold(self, hold):
416
+ self.hold = hold
417
+ return self
418
+
419
+ @property
420
+ def start_mpc_on_enter(self):
421
+ return self.__start_mpc_on_enter
422
+
423
+ @start_mpc_on_enter.setter
424
+ @validate_args(start_mpc_on_enter=[optional(of_type_exact(bool))])
425
+ def start_mpc_on_enter(self, start_mpc_on_enter):
426
+ self.__start_mpc_on_enter = start_mpc_on_enter
427
+
428
+ def set_start_mpc_on_enter(self, start_mpc_on_enter):
429
+ self.start_mpc_on_enter = start_mpc_on_enter
430
+ return self
431
+
432
+ @property
433
+ def end_mpc_on_exit(self):
434
+ return self.__end_mpc_on_exit
435
+
436
+ @end_mpc_on_exit.setter
437
+ @validate_args(end_mpc_on_exit=[optional(of_type_exact(bool))])
438
+ def end_mpc_on_exit(self, end_mpc_on_exit):
439
+ self.__end_mpc_on_exit = end_mpc_on_exit
440
+
441
+ def set_end_mpc_on_exit(self, end_mpc_on_exit):
442
+ self.end_mpc_on_exit = end_mpc_on_exit
443
+ return self
444
+
445
+ @property
446
+ def enter_sound(self):
447
+ return self.__enter_sound
448
+
449
+ @enter_sound.setter
450
+ @validate_args(
451
+ enter_sound=[
452
+ optional(
453
+ all_of(
454
+ of_type_exact(str),
455
+ one_of(is_url(), is_in(('beep:1', 'beep:2', 'none'), case_sensitive=False, case_type='lower'))
456
+ )
457
+ )
458
+ ]
459
+ )
460
+ def enter_sound(self, enter_sound):
461
+ self.__enter_sound = enter_sound
462
+
463
+ def set_enter_sound(self, enter_sound):
464
+ self.enter_sound = enter_sound
465
+ return self
466
+
467
+ @property
468
+ def enter_sound_method(self):
469
+ return self.__enter_sound_method
470
+
471
+ @enter_sound_method.setter
472
+ @validate_args(enter_sound_method=[optional(of_type_exact(str),
473
+ is_in(('GET', 'POST'), case_sensitive=False))])
474
+ def enter_sound_method(self, enter_sound_method):
475
+ self.__enter_sound_method = enter_sound_method
476
+
477
+ def set_enter_sound_method(self, enter_sound_method):
478
+ self.enter_sound_method = enter_sound_method
479
+ return self
480
+
481
+ @property
482
+ def exit_sound(self):
483
+ return self.__exit_sound
484
+
485
+ @exit_sound.setter
486
+ @validate_args(
487
+ exit_sound=[
488
+ optional(
489
+ all_of(
490
+ of_type_exact(str),
491
+ one_of(is_url(), is_in(('beep:1', 'beep:2', 'none'), case_sensitive=False, case_type='lower'))
492
+ )
493
+ )
494
+ ]
495
+ )
496
+ def exit_sound(self, exit_sound):
497
+ self.__exit_sound = exit_sound
498
+
499
+ def set_exit_sound(self, exit_sound):
500
+ self.exit_sound = exit_sound
501
+ return self
502
+
503
+ @property
504
+ def exit_sound_method(self):
505
+ return self.__exit_sound_method
506
+
507
+ @exit_sound_method.setter
508
+ @validate_args(exit_sound_method=[optional(of_type_exact(str),
509
+ is_in(('GET', 'POST'), case_sensitive=False))])
510
+ def exit_sound_method(self, exit_sound_method):
511
+ self.__exit_sound_method = exit_sound_method
512
+
513
+ def set_exit_sound_method(self, exit_sound_method):
514
+ self.exit_sound_method = exit_sound_method
515
+ return self
516
+
517
+ @property
518
+ def on_exit_action_url(self):
519
+ return self.__on_exit_action_url
520
+
521
+ @on_exit_action_url.setter
522
+ @validate_args(on_exit_action_url=[optional(of_type_exact(str), is_url())])
523
+ def on_exit_action_url(self, on_exit_action_url):
524
+ self.__on_exit_action_url = on_exit_action_url
525
+
526
+ def set_on_exit_action_url(self, on_exit_action_url):
527
+ self.on_exit_action_url = on_exit_action_url
528
+ return self
529
+
530
+ @property
531
+ def on_exit_action_method(self):
532
+ return self.__on_exit_action_method
533
+
534
+ @on_exit_action_method.setter
535
+ @validate_args(on_exit_action_method=[optional(of_type_exact(str),
536
+ is_in(('GET', 'POST'), case_sensitive=False))])
537
+ def on_exit_action_method(self, on_exit_action_method):
538
+ self.__on_exit_action_method = on_exit_action_method
539
+
540
+ def set_on_exit_action_method(self, on_exit_action_method):
541
+ self.on_exit_action_method = on_exit_action_method
542
+ return self
543
+
544
+ @property
545
+ def relay_dtmf_inputs(self):
546
+ return self.__relay_dtmf_inputs
547
+
548
+ @relay_dtmf_inputs.setter
549
+ @validate_args(relay_dtmf_inputs=[optional(of_type_exact(bool))])
550
+ def relay_dtmf_inputs(self, relay_dtmf_inputs):
551
+ self.__relay_dtmf_inputs = relay_dtmf_inputs
552
+
553
+ def set_relay_dtmf_inputs(self, relay_dtmf_inputs):
554
+ self.relay_dtmf_inputs = relay_dtmf_inputs
555
+ return self
556
+
557
+ @property
558
+ def transcript(self):
559
+ return self.__transcript
560
+
561
+ @transcript.setter
562
+ @validate_args(transcript=[optional(of_type_exact(bool))])
563
+ def transcript(self, transcript):
564
+ self.__transcript = transcript
565
+
566
+ def set_transcript(self, transcript):
567
+ self.transcript = transcript
568
+ return self
569
+
570
+ @property
571
+ def transcription_url(self):
572
+ return self.__transcription_url
573
+
574
+ @transcription_url.setter
575
+ @validate_args(transcription_url=[optional(of_type_exact(str), is_url())])
576
+ def transcription_url(self, transcription_url):
577
+ self.__transcription_url = transcription_url
578
+
579
+ def set_transcription_url(self, transcription_url):
580
+ self.transcription_url = transcription_url
581
+ return self
582
+
583
+ def __init__(
584
+ self,
585
+ content,
586
+ role,
587
+ max_duration=14400,
588
+ max_participants=10,
589
+ record_min_member_count=1,
590
+ wait_music_url=None,
591
+ wait_music_method='GET',
592
+ wait_time=None,
593
+ agent_hold_music_url=None,
594
+ agent_hold_music_method='GET',
595
+ customer_hold_music_url=None,
596
+ customer_hold_music_method='GET',
597
+ record=False,
598
+ record_participant_track=False,
599
+ record_file_format='mp3',
600
+ recording_callback_url=None,
601
+ recording_callback_method='POST',
602
+ status_callback_events='mpc-state-changes,participant-state-changes',
603
+ status_callback_url=None,
604
+ status_callback_method='POST',
605
+ stay_alone=False,
606
+ coach_mode=True,
607
+ mute=False,
608
+ hold=False,
609
+ start_mpc_on_enter=True,
610
+ end_mpc_on_exit=False,
611
+ enter_sound='beep:1',
612
+ enter_sound_method='GET',
613
+ exit_sound='beep:2',
614
+ exit_sound_method='GET',
615
+ on_exit_action_url=None,
616
+ on_exit_action_method='POST',
617
+ relay_dtmf_inputs=False,
618
+ start_recording_audio=None,
619
+ start_recording_audio_method='GET',
620
+ stop_recording_audio=None,
621
+ stop_recording_audio_method='GET',
622
+ transcript=False,
623
+ transcription_url=None
624
+ ):
625
+ super(MultiPartyCallElement, self).__init__()
626
+ self.stop_recording_audio_method = stop_recording_audio_method
627
+ self.stop_recording_audio = stop_recording_audio
628
+ self.start_recording_audio_method = start_recording_audio_method
629
+ self.start_recording_audio = start_recording_audio
630
+ self.content = content
631
+ self.role = role
632
+ self.max_duration = max_duration
633
+ self.max_participants = max_participants
634
+ self.record_min_member_count = record_min_member_count
635
+ self.wait_music_url = wait_music_url
636
+ self.wait_music_method = wait_music_method
637
+ self.wait_time = wait_time
638
+ self.agent_hold_music_url = agent_hold_music_url
639
+ self.agent_hold_music_method = agent_hold_music_method
640
+ self.customer_hold_music_url = customer_hold_music_url
641
+ self.customer_hold_music_method = customer_hold_music_method
642
+ self.record = record
643
+ self.record_participant_track = record_participant_track
644
+ self.record_file_format = record_file_format
645
+ self.recording_callback_url = recording_callback_url
646
+ self.recording_callback_method = recording_callback_method
647
+ self.status_callback_events = status_callback_events
648
+ self.status_callback_url = status_callback_url
649
+ self.status_callback_method = status_callback_method
650
+ self.stay_alone = stay_alone
651
+ self.coach_mode = coach_mode
652
+ self.mute = mute
653
+ self.hold = hold
654
+ self.start_mpc_on_enter = start_mpc_on_enter
655
+ self.end_mpc_on_exit = end_mpc_on_exit
656
+ self.enter_sound = enter_sound
657
+ self.enter_sound_method = enter_sound_method
658
+ self.exit_sound = exit_sound
659
+ self.exit_sound_method = exit_sound_method
660
+ self.on_exit_action_url = on_exit_action_url
661
+ self.on_exit_action_method = on_exit_action_method
662
+ self.relay_dtmf_inputs = relay_dtmf_inputs
663
+ self.transcript = transcript
664
+ self.transcription_url = transcription_url
665
+
666
+
667
+ def to_dict(self):
668
+ d = {
669
+ 'role': self.role,
670
+ 'maxDuration': self.max_duration,
671
+ 'maxParticipants': self.max_participants,
672
+ 'recordMinMemberCount': self.record_min_member_count,
673
+ 'waitMusicUrl': self.wait_music_url,
674
+ 'waitMusicMethod': self.wait_music_method,
675
+ 'waitTime': self.wait_time,
676
+ 'agentHoldMusicUrl': self.agent_hold_music_url,
677
+ 'agentHoldMusicMethod': self.agent_hold_music_method,
678
+ 'customerHoldMusicUrl': self.customer_hold_music_url,
679
+ 'customerHoldMusicMethod': self.customer_hold_music_method,
680
+ 'record': self.record,
681
+ 'recordParticipantTrack': self.record_participant_track,
682
+ 'recordFileFormat': self.record_file_format,
683
+ 'recordingCallbackUrl': self.recording_callback_url,
684
+ 'recordingCallbackMethod': self.recording_callback_method,
685
+ 'statusCallbackEvents': self.status_callback_events,
686
+ 'statusCallbackUrl': self.status_callback_url,
687
+ 'statusCallbackMethod': self.status_callback_method,
688
+ 'stayAlone': self.stay_alone,
689
+ 'coachMode': self.coach_mode,
690
+ 'mute': self.mute,
691
+ 'hold': self.hold,
692
+ 'startMpcOnEnter': self.start_mpc_on_enter,
693
+ 'endMpcOnExit': self.end_mpc_on_exit,
694
+ 'enterSound': self.enter_sound,
695
+ 'enterSoundMethod': self.enter_sound_method,
696
+ 'exitSound': self.exit_sound,
697
+ 'exitSoundMethod': self.exit_sound_method,
698
+ 'onExitActionUrl': self.on_exit_action_url,
699
+ 'onExitActionMethod': self.on_exit_action_method,
700
+ 'relayDTMFInputs': self.relay_dtmf_inputs,
701
+ 'startRecordingAudio': self.start_recording_audio,
702
+ 'startRecordingAudioMethod': self.start_recording_audio_method,
703
+ 'stopRecordingAudio': self.stop_recording_audio,
704
+ 'stopRecordingAudioMethod': self.stop_recording_audio_method,
705
+ 'transcript': self.transcript,
706
+ 'transcriptionUrl': self.transcription_url
707
+ }
708
+ return {
709
+ k: str(map_type(v))
710
+ for k, v in d.items() if v is not None
711
+ }