-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathticket.py
More file actions
551 lines (428 loc) · 13.7 KB
/
ticket.py
File metadata and controls
551 lines (428 loc) · 13.7 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
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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# 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 Ticket(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
Ticket - 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',
'owner_contactid': 'str',
'owner_email': 'str',
'owner_name': 'str',
'departmentid': 'str',
'agentid': 'str',
'status': 'str',
'tags': 'list[str]',
'code': 'str',
'channel_type': 'str',
'date_created': 'str',
'date_changed': 'str',
'date_resolved': 'str',
'date_due': 'str',
'date_deleted': 'str',
'public_access_urlcode': 'str',
'subject': 'str',
'custom_fields': 'list[CustomFields]'
}
self.attribute_map = {
'id': 'id',
'owner_contactid': 'owner_contactid',
'owner_email': 'owner_email',
'owner_name': 'owner_name',
'departmentid': 'departmentid',
'agentid': 'agentid',
'status': 'status',
'tags': 'tags',
'code': 'code',
'channel_type': 'channel_type',
'date_created': 'date_created',
'date_changed': 'date_changed',
'date_resolved': 'date_resolved',
'date_due': 'date_due',
'date_deleted': 'date_deleted',
'public_access_urlcode': 'public_access_urlcode',
'subject': 'subject',
'custom_fields': 'custom_fields'
}
self._id = None
self._owner_contactid = None
self._owner_email = None
self._owner_name = None
self._departmentid = None
self._agentid = None
self._status = None
self._tags = None
self._code = None
self._channel_type = None
self._date_created = None
self._date_changed = None
self._date_resolved = None
self._date_due = None
self._date_deleted = None
self._public_access_urlcode = None
self._subject = None
self._custom_fields = None
@property
def id(self):
"""
Gets the id of this Ticket.
:return: The id of this Ticket.
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""
Sets the id of this Ticket.
:param id: The id of this Ticket.
:type: str
"""
self._id = id
@property
def owner_contactid(self):
"""
Gets the owner_contactid of this Ticket.
:return: The owner_contactid of this Ticket.
:rtype: str
"""
return self._owner_contactid
@owner_contactid.setter
def owner_contactid(self, owner_contactid):
"""
Sets the owner_contactid of this Ticket.
:param owner_contactid: The owner_contactid of this Ticket.
:type: str
"""
self._owner_contactid = owner_contactid
@property
def owner_email(self):
"""
Gets the owner_email of this Ticket.
:return: The owner_email of this Ticket.
:rtype: str
"""
return self._owner_email
@owner_email.setter
def owner_email(self, owner_email):
"""
Sets the owner_email of this Ticket.
:param owner_email: The owner_email of this Ticket.
:type: str
"""
self._owner_email = owner_email
@property
def owner_name(self):
"""
Gets the owner_name of this Ticket.
:return: The owner_name of this Ticket.
:rtype: str
"""
return self._owner_name
@owner_name.setter
def owner_name(self, owner_name):
"""
Sets the owner_name of this Ticket.
:param owner_name: The owner_name of this Ticket.
:type: str
"""
self._owner_name = owner_name
@property
def departmentid(self):
"""
Gets the departmentid of this Ticket.
:return: The departmentid of this Ticket.
:rtype: str
"""
return self._departmentid
@departmentid.setter
def departmentid(self, departmentid):
"""
Sets the departmentid of this Ticket.
:param departmentid: The departmentid of this Ticket.
:type: str
"""
self._departmentid = departmentid
@property
def agentid(self):
"""
Gets the agentid of this Ticket.
:return: The agentid of this Ticket.
:rtype: str
"""
return self._agentid
@agentid.setter
def agentid(self, agentid):
"""
Sets the agentid of this Ticket.
:param agentid: The agentid of this Ticket.
:type: str
"""
self._agentid = agentid
@property
def status(self):
"""
Gets the status of this Ticket.
<br> I - init<br> N - new<br> T - chatting<br> P - calling<br> R - resolved<br> X - deleted<br> B - spam<br> A - answered<br> C - open<br> W - postponed
:return: The status of this Ticket.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""
Sets the status of this Ticket.
<br> I - init<br> N - new<br> T - chatting<br> P - calling<br> R - resolved<br> X - deleted<br> B - spam<br> A - answered<br> C - open<br> W - postponed
:param status: The status of this Ticket.
:type: str
"""
allowed_values = ["I", "N", "T", "P", "R", "X", "B", "A", "C", "W"]
if status not in allowed_values:
raise ValueError(
"Invalid value for `status`, must be one of {0}"
.format(allowed_values)
)
self._status = status
@property
def tags(self):
"""
Gets the tags of this Ticket.
:return: The tags of this Ticket.
:rtype: list[str]
"""
return self._tags
@tags.setter
def tags(self, tags):
"""
Sets the tags of this Ticket.
:param tags: The tags of this Ticket.
:type: list[str]
"""
self._tags = tags
@property
def code(self):
"""
Gets the code of this Ticket.
:return: The code of this Ticket.
:rtype: str
"""
return self._code
@code.setter
def code(self, code):
"""
Sets the code of this Ticket.
:param code: The code of this Ticket.
:type: str
"""
self._code = code
@property
def channel_type(self):
"""
Gets the channel_type of this Ticket.
<br> E - email<br> B - contact button<br> M - contact form<br> I - invitation<br> C - call<br> W - call button<br> F - facebook<br> A - facebook message<br> T - twitter<br> H - weibo<br> J - weibo private<br> D - tencent<br> N - tencent private<br> Q - forum<br> S - suggestion
:return: The channel_type of this Ticket.
:rtype: str
"""
return self._channel_type
@channel_type.setter
def channel_type(self, channel_type):
"""
Sets the channel_type of this Ticket.
<br> E - email<br> B - contact button<br> M - contact form<br> I - invitation<br> C - call<br> W - call button<br> F - facebook<br> A - facebook message<br> T - twitter<br> H - weibo<br> J - weibo private<br> D - tencent<br> N - tencent private<br> Q - forum<br> S - suggestion
:param channel_type: The channel_type of this Ticket.
:type: str
"""
self._channel_type = channel_type
@property
def date_created(self):
"""
Gets the date_created of this Ticket.
:return: The date_created of this Ticket.
:rtype: str
"""
return self._date_created
@date_created.setter
def date_created(self, date_created):
"""
Sets the date_created of this Ticket.
:param date_created: The date_created of this Ticket.
:type: str
"""
self._date_created = date_created
@property
def date_changed(self):
"""
Gets the date_changed of this Ticket.
:return: The date_changed of this Ticket.
:rtype: str
"""
return self._date_changed
@date_changed.setter
def date_changed(self, date_changed):
"""
Sets the date_changed of this Ticket.
:param date_changed: The date_changed of this Ticket.
:type: str
"""
self._date_changed = date_changed
@property
def date_resolved(self):
"""
Gets the date_resolved of this Ticket.
:return: The date_resolved of this Ticket.
:rtype: str
"""
return self._date_resolved
@date_resolved.setter
def date_resolved(self, date_resolved):
"""
Sets the date_resolved of this Ticket.
:param date_resolved: The date_resolved of this Ticket.
:type: str
"""
self._date_resolved = date_resolved
@property
def date_due(self):
"""
Gets the date_due of this Ticket.
:return: The date_due of this Ticket.
:rtype: str
"""
return self._date_due
@date_due.setter
def date_due(self, date_due):
"""
Sets the date_due of this Ticket.
:param date_due: The date_due of this Ticket.
:type: str
"""
self._date_due = date_due
@property
def date_deleted(self):
"""
Gets the date_deleted of this Ticket.
:return: The date_deleted of this Ticket.
:rtype: str
"""
return self._date_deleted
@date_deleted.setter
def date_deleted(self, date_deleted):
"""
Sets the date_deleted of this Ticket.
:param date_deleted: The date_deleted of this Ticket.
:type: str
"""
self._date_deleted = date_deleted
@property
def public_access_urlcode(self):
"""
Gets the public_access_urlcode of this Ticket.
:return: The public_access_urlcode of this Ticket.
:rtype: str
"""
return self._public_access_urlcode
@public_access_urlcode.setter
def public_access_urlcode(self, public_access_urlcode):
"""
Sets the public_access_urlcode of this Ticket.
:param public_access_urlcode: The public_access_urlcode of this Ticket.
:type: str
"""
self._public_access_urlcode = public_access_urlcode
@property
def subject(self):
"""
Gets the subject of this Ticket.
:return: The subject of this Ticket.
:rtype: str
"""
return self._subject
@subject.setter
def subject(self, subject):
"""
Sets the subject of this Ticket.
:param subject: The subject of this Ticket.
:type: str
"""
self._subject = subject
@property
def custom_fields(self):
"""
Gets the custom_fields of this Ticket.
:return: The custom_fields of this Ticket.
:rtype: list[CustomFields]
"""
return self._custom_fields
@custom_fields.setter
def custom_fields(self, custom_fields):
"""
Sets the custom_fields of this Ticket.
:param custom_fields: The custom_fields of this Ticket.
:type: list[CustomFields]
"""
self._custom_fields = custom_fields
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