-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcall.py
More file actions
407 lines (330 loc) · 10.4 KB
/
call.py
File metadata and controls
407 lines (330 loc) · 10.4 KB
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
# coding: utf-8
"""
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Ref: https://github.com/swagger-api/swagger-codegen
"""
from pprint import pformat
from six import iteritems
class Call(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Call - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
"""
self.swagger_types = {
'id': 'str',
'ticket_id': 'str',
'direction': 'str',
'callee_status': 'str',
'ivrs': 'list[Ivr]',
'record_call': 'bool',
'reroute_time': 'float',
'online_ivr': 'str',
'offline_ivr': 'str',
'queue_ivr': 'str',
'from_number': 'str',
'caller_name': 'str'
}
self.attribute_map = {
'id': 'id',
'ticket_id': 'ticket_id',
'direction': 'direction',
'callee_status': 'callee_status',
'ivrs': 'ivrs',
'record_call': 'record_call',
'reroute_time': 'reroute_time',
'online_ivr': 'online_ivr',
'offline_ivr': 'offline_ivr',
'queue_ivr': 'queue_ivr',
'from_number': 'from_number',
'caller_name': 'caller_name'
}
self._id = None
self._ticket_id = None
self._direction = None
self._callee_status = None
self._ivrs = None
self._record_call = False
self._reroute_time = None
self._online_ivr = None
self._offline_ivr = None
self._queue_ivr = None
self._from_number = None
self._caller_name = None
@property
def id(self):
"""
Gets the id of this Call.
:return: The id of this Call.
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""
Sets the id of this Call.
:param id: The id of this Call.
:type: str
"""
self._id = id
@property
def ticket_id(self):
"""
Gets the ticket_id of this Call.
:return: The ticket_id of this Call.
:rtype: str
"""
return self._ticket_id
@ticket_id.setter
def ticket_id(self, ticket_id):
"""
Sets the ticket_id of this Call.
:param ticket_id: The ticket_id of this Call.
:type: str
"""
self._ticket_id = ticket_id
@property
def direction(self):
"""
Gets the direction of this Call.
incoming call ('in' - default), outgoing call ('out'), internal call('int')
:return: The direction of this Call.
:rtype: str
"""
return self._direction
@direction.setter
def direction(self, direction):
"""
Sets the direction of this Call.
incoming call ('in' - default), outgoing call ('out'), internal call('int')
:param direction: The direction of this Call.
:type: str
"""
allowed_values = ["in", "out", "int"]
if direction not in allowed_values:
raise ValueError(
"Invalid value for `direction`, must be one of {0}"
.format(allowed_values)
)
self._direction = direction
@property
def callee_status(self):
"""
Gets the callee_status of this Call.
O - online, F - offline, U - unknown
:return: The callee_status of this Call.
:rtype: str
"""
return self._callee_status
@callee_status.setter
def callee_status(self, callee_status):
"""
Sets the callee_status of this Call.
O - online, F - offline, U - unknown
:param callee_status: The callee_status of this Call.
:type: str
"""
allowed_values = ["O", "F", "U"]
if callee_status not in allowed_values:
raise ValueError(
"Invalid value for `callee_status`, must be one of {0}"
.format(allowed_values)
)
self._callee_status = callee_status
@property
def ivrs(self):
"""
Gets the ivrs of this Call.
:return: The ivrs of this Call.
:rtype: list[Ivr]
"""
return self._ivrs
@ivrs.setter
def ivrs(self, ivrs):
"""
Sets the ivrs of this Call.
:param ivrs: The ivrs of this Call.
:type: list[Ivr]
"""
self._ivrs = ivrs
@property
def record_call(self):
"""
Gets the record_call of this Call.
:return: The record_call of this Call.
:rtype: bool
"""
return self._record_call
@record_call.setter
def record_call(self, record_call):
"""
Sets the record_call of this Call.
:param record_call: The record_call of this Call.
:type: bool
"""
self._record_call = record_call
@property
def reroute_time(self):
"""
Gets the reroute_time of this Call.
:return: The reroute_time of this Call.
:rtype: float
"""
return self._reroute_time
@reroute_time.setter
def reroute_time(self, reroute_time):
"""
Sets the reroute_time of this Call.
:param reroute_time: The reroute_time of this Call.
:type: float
"""
self._reroute_time = reroute_time
@property
def online_ivr(self):
"""
Gets the online_ivr of this Call.
Name of IVR in case the service is online. If empty, call starts ringing to agents
:return: The online_ivr of this Call.
:rtype: str
"""
return self._online_ivr
@online_ivr.setter
def online_ivr(self, online_ivr):
"""
Sets the online_ivr of this Call.
Name of IVR in case the service is online. If empty, call starts ringing to agents
:param online_ivr: The online_ivr of this Call.
:type: str
"""
self._online_ivr = online_ivr
@property
def offline_ivr(self):
"""
Gets the offline_ivr of this Call.
Name of IVR in case the service is offline. If empty, call hangs up with not available tone
:return: The offline_ivr of this Call.
:rtype: str
"""
return self._offline_ivr
@offline_ivr.setter
def offline_ivr(self, offline_ivr):
"""
Sets the offline_ivr of this Call.
Name of IVR in case the service is offline. If empty, call hangs up with not available tone
:param offline_ivr: The offline_ivr of this Call.
:type: str
"""
self._offline_ivr = offline_ivr
@property
def queue_ivr(self):
"""
Gets the queue_ivr of this Call.
Name of IVR while waiting in queue. If empty, default in queue music is played
:return: The queue_ivr of this Call.
:rtype: str
"""
return self._queue_ivr
@queue_ivr.setter
def queue_ivr(self, queue_ivr):
"""
Sets the queue_ivr of this Call.
Name of IVR while waiting in queue. If empty, default in queue music is played
:param queue_ivr: The queue_ivr of this Call.
:type: str
"""
self._queue_ivr = queue_ivr
@property
def from_number(self):
"""
Gets the from_number of this Call.
Caller number
:return: The from_number of this Call.
:rtype: str
"""
return self._from_number
@from_number.setter
def from_number(self, from_number):
"""
Sets the from_number of this Call.
Caller number
:param from_number: The from_number of this Call.
:type: str
"""
self._from_number = from_number
@property
def caller_name(self):
"""
Gets the caller_name of this Call.
Name of the caller in case it is known
:return: The caller_name of this Call.
:rtype: str
"""
return self._caller_name
@caller_name.setter
def caller_name(self, caller_name):
"""
Sets the caller_name of this Call.
Name of the caller in case it is known
:param caller_name: The caller_name of this Call.
:type: str
"""
self._caller_name = caller_name
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""
Returns the string representation of the model
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()
def __eq__(self, other):
"""
Returns true if both objects are equal
"""
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other