Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5549 amar.kumar 1
#
2
# Autogenerated by Thrift Compiler (0.7.0)
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
import shop2020.thriftpy.generic.GenericService
9
from ttypes import *
10
from thrift.Thrift import TProcessor
11
from thrift.transport import TTransport
12
from thrift.protocol import TBinaryProtocol, TProtocol
13
try:
14
  from thrift.protocol import fastbinary
15
except:
16
  fastbinary = None
17
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  def scheduleAlert(self, entity):
21
    """
22
    Create a new tracking object.
23
 
24
    Parameters:
25
     - entity
26
    """
27
    pass
28
 
29
  def updateMonitoredObject(self, entity):
30
    """
31
    Update previously stored tracking object.
32
 
33
    Parameters:
34
     - entity
35
    """
36
    pass
37
 
38
  def endMonitoringEntity(self, entityType, entityIdentifier):
39
    """
40
    Stop tracking the entity
41
 
42
    Parameters:
43
     - entityType
44
     - entityIdentifier
45
    """
46
    pass
47
 
48
  def getEntities(self, searchFilter):
49
    """
50
    Get entities with specified conditions in SearchFilter Object
51
 
52
    Parameters:
53
     - searchFilter
54
    """
55
    pass
56
 
57
  def getAlertedEntities(self, searchFilter):
58
    """
59
    Get entities with specified conditions in SearchFilter Object
60
 
61
    Parameters:
62
     - searchFilter
63
    """
64
    pass
65
 
66
  def getAlertMapper(self, entityType, eventType):
67
    """
68
    Get alertMap for entityType and eventType
69
 
70
    Parameters:
71
     - entityType
72
     - eventType
73
    """
74
    pass
75
 
76
  def activateEntityMonitoring(self, entityType, userIds):
77
    """
78
    Start monitoring entityType or Update monitoring paremeters
79
 
80
    Parameters:
81
     - entityType
82
     - userIds
83
    """
84
    pass
85
 
86
  def deActivateEntityMonitoring(self, entityType):
87
    """
88
    Stop monitoring entityType
89
 
90
    Parameters:
91
     - entityType
92
    """
93
    pass
94
 
95
  def registerEventType(self, alertMap):
96
    """
97
    Add AlertMap values for particular entity and event
98
 
99
    Parameters:
100
     - alertMap
101
    """
102
    pass
103
 
104
 
105
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
106
  def __init__(self, iprot, oprot=None):
107
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
108
 
109
  def scheduleAlert(self, entity):
110
    """
111
    Create a new tracking object.
112
 
113
    Parameters:
114
     - entity
115
    """
116
    self.send_scheduleAlert(entity)
117
    self.recv_scheduleAlert()
118
 
119
  def send_scheduleAlert(self, entity):
120
    self._oprot.writeMessageBegin('scheduleAlert', TMessageType.CALL, self._seqid)
121
    args = scheduleAlert_args()
122
    args.entity = entity
123
    args.write(self._oprot)
124
    self._oprot.writeMessageEnd()
125
    self._oprot.trans.flush()
126
 
127
  def recv_scheduleAlert(self, ):
128
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
129
    if mtype == TMessageType.EXCEPTION:
130
      x = TApplicationException()
131
      x.read(self._iprot)
132
      self._iprot.readMessageEnd()
133
      raise x
134
    result = scheduleAlert_result()
135
    result.read(self._iprot)
136
    self._iprot.readMessageEnd()
137
    if result.e is not None:
138
      raise result.e
139
    return
140
 
141
  def updateMonitoredObject(self, entity):
142
    """
143
    Update previously stored tracking object.
144
 
145
    Parameters:
146
     - entity
147
    """
148
    self.send_updateMonitoredObject(entity)
149
    self.recv_updateMonitoredObject()
150
 
151
  def send_updateMonitoredObject(self, entity):
152
    self._oprot.writeMessageBegin('updateMonitoredObject', TMessageType.CALL, self._seqid)
153
    args = updateMonitoredObject_args()
154
    args.entity = entity
155
    args.write(self._oprot)
156
    self._oprot.writeMessageEnd()
157
    self._oprot.trans.flush()
158
 
159
  def recv_updateMonitoredObject(self, ):
160
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
161
    if mtype == TMessageType.EXCEPTION:
162
      x = TApplicationException()
163
      x.read(self._iprot)
164
      self._iprot.readMessageEnd()
165
      raise x
166
    result = updateMonitoredObject_result()
167
    result.read(self._iprot)
168
    self._iprot.readMessageEnd()
169
    if result.e is not None:
170
      raise result.e
171
    return
172
 
173
  def endMonitoringEntity(self, entityType, entityIdentifier):
174
    """
175
    Stop tracking the entity
176
 
177
    Parameters:
178
     - entityType
179
     - entityIdentifier
180
    """
181
    self.send_endMonitoringEntity(entityType, entityIdentifier)
182
    self.recv_endMonitoringEntity()
183
 
184
  def send_endMonitoringEntity(self, entityType, entityIdentifier):
185
    self._oprot.writeMessageBegin('endMonitoringEntity', TMessageType.CALL, self._seqid)
186
    args = endMonitoringEntity_args()
187
    args.entityType = entityType
188
    args.entityIdentifier = entityIdentifier
189
    args.write(self._oprot)
190
    self._oprot.writeMessageEnd()
191
    self._oprot.trans.flush()
192
 
193
  def recv_endMonitoringEntity(self, ):
194
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
195
    if mtype == TMessageType.EXCEPTION:
196
      x = TApplicationException()
197
      x.read(self._iprot)
198
      self._iprot.readMessageEnd()
199
      raise x
200
    result = endMonitoringEntity_result()
201
    result.read(self._iprot)
202
    self._iprot.readMessageEnd()
203
    if result.e is not None:
204
      raise result.e
205
    return
206
 
207
  def getEntities(self, searchFilter):
208
    """
209
    Get entities with specified conditions in SearchFilter Object
210
 
211
    Parameters:
212
     - searchFilter
213
    """
214
    self.send_getEntities(searchFilter)
215
    return self.recv_getEntities()
216
 
217
  def send_getEntities(self, searchFilter):
218
    self._oprot.writeMessageBegin('getEntities', TMessageType.CALL, self._seqid)
219
    args = getEntities_args()
220
    args.searchFilter = searchFilter
221
    args.write(self._oprot)
222
    self._oprot.writeMessageEnd()
223
    self._oprot.trans.flush()
224
 
225
  def recv_getEntities(self, ):
226
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
227
    if mtype == TMessageType.EXCEPTION:
228
      x = TApplicationException()
229
      x.read(self._iprot)
230
      self._iprot.readMessageEnd()
231
      raise x
232
    result = getEntities_result()
233
    result.read(self._iprot)
234
    self._iprot.readMessageEnd()
235
    if result.success is not None:
236
      return result.success
237
    if result.e is not None:
238
      raise result.e
239
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getEntities failed: unknown result");
240
 
241
  def getAlertedEntities(self, searchFilter):
242
    """
243
    Get entities with specified conditions in SearchFilter Object
244
 
245
    Parameters:
246
     - searchFilter
247
    """
248
    self.send_getAlertedEntities(searchFilter)
249
    return self.recv_getAlertedEntities()
250
 
251
  def send_getAlertedEntities(self, searchFilter):
252
    self._oprot.writeMessageBegin('getAlertedEntities', TMessageType.CALL, self._seqid)
253
    args = getAlertedEntities_args()
254
    args.searchFilter = searchFilter
255
    args.write(self._oprot)
256
    self._oprot.writeMessageEnd()
257
    self._oprot.trans.flush()
258
 
259
  def recv_getAlertedEntities(self, ):
260
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
261
    if mtype == TMessageType.EXCEPTION:
262
      x = TApplicationException()
263
      x.read(self._iprot)
264
      self._iprot.readMessageEnd()
265
      raise x
266
    result = getAlertedEntities_result()
267
    result.read(self._iprot)
268
    self._iprot.readMessageEnd()
269
    if result.success is not None:
270
      return result.success
271
    if result.e is not None:
272
      raise result.e
273
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlertedEntities failed: unknown result");
274
 
275
  def getAlertMapper(self, entityType, eventType):
276
    """
277
    Get alertMap for entityType and eventType
278
 
279
    Parameters:
280
     - entityType
281
     - eventType
282
    """
283
    self.send_getAlertMapper(entityType, eventType)
284
    return self.recv_getAlertMapper()
285
 
286
  def send_getAlertMapper(self, entityType, eventType):
287
    self._oprot.writeMessageBegin('getAlertMapper', TMessageType.CALL, self._seqid)
288
    args = getAlertMapper_args()
289
    args.entityType = entityType
290
    args.eventType = eventType
291
    args.write(self._oprot)
292
    self._oprot.writeMessageEnd()
293
    self._oprot.trans.flush()
294
 
295
  def recv_getAlertMapper(self, ):
296
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
297
    if mtype == TMessageType.EXCEPTION:
298
      x = TApplicationException()
299
      x.read(self._iprot)
300
      self._iprot.readMessageEnd()
301
      raise x
302
    result = getAlertMapper_result()
303
    result.read(self._iprot)
304
    self._iprot.readMessageEnd()
305
    if result.success is not None:
306
      return result.success
307
    if result.e is not None:
308
      raise result.e
309
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlertMapper failed: unknown result");
310
 
311
  def activateEntityMonitoring(self, entityType, userIds):
312
    """
313
    Start monitoring entityType or Update monitoring paremeters
314
 
315
    Parameters:
316
     - entityType
317
     - userIds
318
    """
319
    self.send_activateEntityMonitoring(entityType, userIds)
320
    self.recv_activateEntityMonitoring()
321
 
322
  def send_activateEntityMonitoring(self, entityType, userIds):
323
    self._oprot.writeMessageBegin('activateEntityMonitoring', TMessageType.CALL, self._seqid)
324
    args = activateEntityMonitoring_args()
325
    args.entityType = entityType
326
    args.userIds = userIds
327
    args.write(self._oprot)
328
    self._oprot.writeMessageEnd()
329
    self._oprot.trans.flush()
330
 
331
  def recv_activateEntityMonitoring(self, ):
332
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
333
    if mtype == TMessageType.EXCEPTION:
334
      x = TApplicationException()
335
      x.read(self._iprot)
336
      self._iprot.readMessageEnd()
337
      raise x
338
    result = activateEntityMonitoring_result()
339
    result.read(self._iprot)
340
    self._iprot.readMessageEnd()
341
    if result.e is not None:
342
      raise result.e
343
    return
344
 
345
  def deActivateEntityMonitoring(self, entityType):
346
    """
347
    Stop monitoring entityType
348
 
349
    Parameters:
350
     - entityType
351
    """
352
    self.send_deActivateEntityMonitoring(entityType)
353
    self.recv_deActivateEntityMonitoring()
354
 
355
  def send_deActivateEntityMonitoring(self, entityType):
356
    self._oprot.writeMessageBegin('deActivateEntityMonitoring', TMessageType.CALL, self._seqid)
357
    args = deActivateEntityMonitoring_args()
358
    args.entityType = entityType
359
    args.write(self._oprot)
360
    self._oprot.writeMessageEnd()
361
    self._oprot.trans.flush()
362
 
363
  def recv_deActivateEntityMonitoring(self, ):
364
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
365
    if mtype == TMessageType.EXCEPTION:
366
      x = TApplicationException()
367
      x.read(self._iprot)
368
      self._iprot.readMessageEnd()
369
      raise x
370
    result = deActivateEntityMonitoring_result()
371
    result.read(self._iprot)
372
    self._iprot.readMessageEnd()
373
    if result.e is not None:
374
      raise result.e
375
    return
376
 
377
  def registerEventType(self, alertMap):
378
    """
379
    Add AlertMap values for particular entity and event
380
 
381
    Parameters:
382
     - alertMap
383
    """
384
    self.send_registerEventType(alertMap)
385
    self.recv_registerEventType()
386
 
387
  def send_registerEventType(self, alertMap):
388
    self._oprot.writeMessageBegin('registerEventType', TMessageType.CALL, self._seqid)
389
    args = registerEventType_args()
390
    args.alertMap = alertMap
391
    args.write(self._oprot)
392
    self._oprot.writeMessageEnd()
393
    self._oprot.trans.flush()
394
 
395
  def recv_registerEventType(self, ):
396
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
397
    if mtype == TMessageType.EXCEPTION:
398
      x = TApplicationException()
399
      x.read(self._iprot)
400
      self._iprot.readMessageEnd()
401
      raise x
402
    result = registerEventType_result()
403
    result.read(self._iprot)
404
    self._iprot.readMessageEnd()
405
    if result.e is not None:
406
      raise result.e
407
    return
408
 
409
 
410
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
411
  def __init__(self, handler):
412
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
413
    self._processMap["scheduleAlert"] = Processor.process_scheduleAlert
414
    self._processMap["updateMonitoredObject"] = Processor.process_updateMonitoredObject
415
    self._processMap["endMonitoringEntity"] = Processor.process_endMonitoringEntity
416
    self._processMap["getEntities"] = Processor.process_getEntities
417
    self._processMap["getAlertedEntities"] = Processor.process_getAlertedEntities
418
    self._processMap["getAlertMapper"] = Processor.process_getAlertMapper
419
    self._processMap["activateEntityMonitoring"] = Processor.process_activateEntityMonitoring
420
    self._processMap["deActivateEntityMonitoring"] = Processor.process_deActivateEntityMonitoring
421
    self._processMap["registerEventType"] = Processor.process_registerEventType
422
 
423
  def process(self, iprot, oprot):
424
    (name, type, seqid) = iprot.readMessageBegin()
425
    if name not in self._processMap:
426
      iprot.skip(TType.STRUCT)
427
      iprot.readMessageEnd()
428
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
429
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
430
      x.write(oprot)
431
      oprot.writeMessageEnd()
432
      oprot.trans.flush()
433
      return
434
    else:
435
      self._processMap[name](self, seqid, iprot, oprot)
436
    return True
437
 
438
  def process_scheduleAlert(self, seqid, iprot, oprot):
439
    args = scheduleAlert_args()
440
    args.read(iprot)
441
    iprot.readMessageEnd()
442
    result = scheduleAlert_result()
443
    try:
444
      self._handler.scheduleAlert(args.entity)
445
    except AlertServiceException, e:
446
      result.e = e
447
    oprot.writeMessageBegin("scheduleAlert", TMessageType.REPLY, seqid)
448
    result.write(oprot)
449
    oprot.writeMessageEnd()
450
    oprot.trans.flush()
451
 
452
  def process_updateMonitoredObject(self, seqid, iprot, oprot):
453
    args = updateMonitoredObject_args()
454
    args.read(iprot)
455
    iprot.readMessageEnd()
456
    result = updateMonitoredObject_result()
457
    try:
458
      self._handler.updateMonitoredObject(args.entity)
459
    except AlertServiceException, e:
460
      result.e = e
461
    oprot.writeMessageBegin("updateMonitoredObject", TMessageType.REPLY, seqid)
462
    result.write(oprot)
463
    oprot.writeMessageEnd()
464
    oprot.trans.flush()
465
 
466
  def process_endMonitoringEntity(self, seqid, iprot, oprot):
467
    args = endMonitoringEntity_args()
468
    args.read(iprot)
469
    iprot.readMessageEnd()
470
    result = endMonitoringEntity_result()
471
    try:
472
      self._handler.endMonitoringEntity(args.entityType, args.entityIdentifier)
473
    except AlertServiceException, e:
474
      result.e = e
475
    oprot.writeMessageBegin("endMonitoringEntity", TMessageType.REPLY, seqid)
476
    result.write(oprot)
477
    oprot.writeMessageEnd()
478
    oprot.trans.flush()
479
 
480
  def process_getEntities(self, seqid, iprot, oprot):
481
    args = getEntities_args()
482
    args.read(iprot)
483
    iprot.readMessageEnd()
484
    result = getEntities_result()
485
    try:
486
      result.success = self._handler.getEntities(args.searchFilter)
487
    except AlertServiceException, e:
488
      result.e = e
489
    oprot.writeMessageBegin("getEntities", TMessageType.REPLY, seqid)
490
    result.write(oprot)
491
    oprot.writeMessageEnd()
492
    oprot.trans.flush()
493
 
494
  def process_getAlertedEntities(self, seqid, iprot, oprot):
495
    args = getAlertedEntities_args()
496
    args.read(iprot)
497
    iprot.readMessageEnd()
498
    result = getAlertedEntities_result()
499
    try:
500
      result.success = self._handler.getAlertedEntities(args.searchFilter)
501
    except AlertServiceException, e:
502
      result.e = e
503
    oprot.writeMessageBegin("getAlertedEntities", TMessageType.REPLY, seqid)
504
    result.write(oprot)
505
    oprot.writeMessageEnd()
506
    oprot.trans.flush()
507
 
508
  def process_getAlertMapper(self, seqid, iprot, oprot):
509
    args = getAlertMapper_args()
510
    args.read(iprot)
511
    iprot.readMessageEnd()
512
    result = getAlertMapper_result()
513
    try:
514
      result.success = self._handler.getAlertMapper(args.entityType, args.eventType)
515
    except AlertServiceException, e:
516
      result.e = e
517
    oprot.writeMessageBegin("getAlertMapper", TMessageType.REPLY, seqid)
518
    result.write(oprot)
519
    oprot.writeMessageEnd()
520
    oprot.trans.flush()
521
 
522
  def process_activateEntityMonitoring(self, seqid, iprot, oprot):
523
    args = activateEntityMonitoring_args()
524
    args.read(iprot)
525
    iprot.readMessageEnd()
526
    result = activateEntityMonitoring_result()
527
    try:
528
      self._handler.activateEntityMonitoring(args.entityType, args.userIds)
529
    except AlertServiceException, e:
530
      result.e = e
531
    oprot.writeMessageBegin("activateEntityMonitoring", TMessageType.REPLY, seqid)
532
    result.write(oprot)
533
    oprot.writeMessageEnd()
534
    oprot.trans.flush()
535
 
536
  def process_deActivateEntityMonitoring(self, seqid, iprot, oprot):
537
    args = deActivateEntityMonitoring_args()
538
    args.read(iprot)
539
    iprot.readMessageEnd()
540
    result = deActivateEntityMonitoring_result()
541
    try:
542
      self._handler.deActivateEntityMonitoring(args.entityType)
543
    except AlertServiceException, e:
544
      result.e = e
545
    oprot.writeMessageBegin("deActivateEntityMonitoring", TMessageType.REPLY, seqid)
546
    result.write(oprot)
547
    oprot.writeMessageEnd()
548
    oprot.trans.flush()
549
 
550
  def process_registerEventType(self, seqid, iprot, oprot):
551
    args = registerEventType_args()
552
    args.read(iprot)
553
    iprot.readMessageEnd()
554
    result = registerEventType_result()
555
    try:
556
      self._handler.registerEventType(args.alertMap)
557
    except AlertServiceException, e:
558
      result.e = e
559
    oprot.writeMessageBegin("registerEventType", TMessageType.REPLY, seqid)
560
    result.write(oprot)
561
    oprot.writeMessageEnd()
562
    oprot.trans.flush()
563
 
564
 
565
# HELPER FUNCTIONS AND STRUCTURES
566
 
567
class scheduleAlert_args:
568
  """
569
  Attributes:
570
   - entity
571
  """
572
 
573
  thrift_spec = (
574
    None, # 0
575
    (1, TType.STRUCT, 'entity', (MonitoredEntity, MonitoredEntity.thrift_spec), None, ), # 1
576
  )
577
 
578
  def __init__(self, entity=None,):
579
    self.entity = entity
580
 
581
  def read(self, iprot):
582
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
583
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
584
      return
585
    iprot.readStructBegin()
586
    while True:
587
      (fname, ftype, fid) = iprot.readFieldBegin()
588
      if ftype == TType.STOP:
589
        break
590
      if fid == 1:
591
        if ftype == TType.STRUCT:
592
          self.entity = MonitoredEntity()
593
          self.entity.read(iprot)
594
        else:
595
          iprot.skip(ftype)
596
      else:
597
        iprot.skip(ftype)
598
      iprot.readFieldEnd()
599
    iprot.readStructEnd()
600
 
601
  def write(self, oprot):
602
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
603
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
604
      return
605
    oprot.writeStructBegin('scheduleAlert_args')
606
    if self.entity is not None:
607
      oprot.writeFieldBegin('entity', TType.STRUCT, 1)
608
      self.entity.write(oprot)
609
      oprot.writeFieldEnd()
610
    oprot.writeFieldStop()
611
    oprot.writeStructEnd()
612
 
613
  def validate(self):
614
    return
615
 
616
 
617
  def __repr__(self):
618
    L = ['%s=%r' % (key, value)
619
      for key, value in self.__dict__.iteritems()]
620
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
621
 
622
  def __eq__(self, other):
623
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
624
 
625
  def __ne__(self, other):
626
    return not (self == other)
627
 
628
class scheduleAlert_result:
629
  """
630
  Attributes:
631
   - e
632
  """
633
 
634
  thrift_spec = (
635
    None, # 0
636
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
637
  )
638
 
639
  def __init__(self, e=None,):
640
    self.e = e
641
 
642
  def read(self, iprot):
643
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
644
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
645
      return
646
    iprot.readStructBegin()
647
    while True:
648
      (fname, ftype, fid) = iprot.readFieldBegin()
649
      if ftype == TType.STOP:
650
        break
651
      if fid == 1:
652
        if ftype == TType.STRUCT:
653
          self.e = AlertServiceException()
654
          self.e.read(iprot)
655
        else:
656
          iprot.skip(ftype)
657
      else:
658
        iprot.skip(ftype)
659
      iprot.readFieldEnd()
660
    iprot.readStructEnd()
661
 
662
  def write(self, oprot):
663
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
664
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
665
      return
666
    oprot.writeStructBegin('scheduleAlert_result')
667
    if self.e is not None:
668
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
669
      self.e.write(oprot)
670
      oprot.writeFieldEnd()
671
    oprot.writeFieldStop()
672
    oprot.writeStructEnd()
673
 
674
  def validate(self):
675
    return
676
 
677
 
678
  def __repr__(self):
679
    L = ['%s=%r' % (key, value)
680
      for key, value in self.__dict__.iteritems()]
681
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
682
 
683
  def __eq__(self, other):
684
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
685
 
686
  def __ne__(self, other):
687
    return not (self == other)
688
 
689
class updateMonitoredObject_args:
690
  """
691
  Attributes:
692
   - entity
693
  """
694
 
695
  thrift_spec = (
696
    None, # 0
697
    (1, TType.STRUCT, 'entity', (MonitoredEntity, MonitoredEntity.thrift_spec), None, ), # 1
698
  )
699
 
700
  def __init__(self, entity=None,):
701
    self.entity = entity
702
 
703
  def read(self, iprot):
704
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
705
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
706
      return
707
    iprot.readStructBegin()
708
    while True:
709
      (fname, ftype, fid) = iprot.readFieldBegin()
710
      if ftype == TType.STOP:
711
        break
712
      if fid == 1:
713
        if ftype == TType.STRUCT:
714
          self.entity = MonitoredEntity()
715
          self.entity.read(iprot)
716
        else:
717
          iprot.skip(ftype)
718
      else:
719
        iprot.skip(ftype)
720
      iprot.readFieldEnd()
721
    iprot.readStructEnd()
722
 
723
  def write(self, oprot):
724
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
725
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
726
      return
727
    oprot.writeStructBegin('updateMonitoredObject_args')
728
    if self.entity is not None:
729
      oprot.writeFieldBegin('entity', TType.STRUCT, 1)
730
      self.entity.write(oprot)
731
      oprot.writeFieldEnd()
732
    oprot.writeFieldStop()
733
    oprot.writeStructEnd()
734
 
735
  def validate(self):
736
    return
737
 
738
 
739
  def __repr__(self):
740
    L = ['%s=%r' % (key, value)
741
      for key, value in self.__dict__.iteritems()]
742
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
743
 
744
  def __eq__(self, other):
745
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
746
 
747
  def __ne__(self, other):
748
    return not (self == other)
749
 
750
class updateMonitoredObject_result:
751
  """
752
  Attributes:
753
   - e
754
  """
755
 
756
  thrift_spec = (
757
    None, # 0
758
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
759
  )
760
 
761
  def __init__(self, e=None,):
762
    self.e = e
763
 
764
  def read(self, iprot):
765
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
766
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
767
      return
768
    iprot.readStructBegin()
769
    while True:
770
      (fname, ftype, fid) = iprot.readFieldBegin()
771
      if ftype == TType.STOP:
772
        break
773
      if fid == 1:
774
        if ftype == TType.STRUCT:
775
          self.e = AlertServiceException()
776
          self.e.read(iprot)
777
        else:
778
          iprot.skip(ftype)
779
      else:
780
        iprot.skip(ftype)
781
      iprot.readFieldEnd()
782
    iprot.readStructEnd()
783
 
784
  def write(self, oprot):
785
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
786
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
787
      return
788
    oprot.writeStructBegin('updateMonitoredObject_result')
789
    if self.e is not None:
790
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
791
      self.e.write(oprot)
792
      oprot.writeFieldEnd()
793
    oprot.writeFieldStop()
794
    oprot.writeStructEnd()
795
 
796
  def validate(self):
797
    return
798
 
799
 
800
  def __repr__(self):
801
    L = ['%s=%r' % (key, value)
802
      for key, value in self.__dict__.iteritems()]
803
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
804
 
805
  def __eq__(self, other):
806
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
807
 
808
  def __ne__(self, other):
809
    return not (self == other)
810
 
811
class endMonitoringEntity_args:
812
  """
813
  Attributes:
814
   - entityType
815
   - entityIdentifier
816
  """
817
 
818
  thrift_spec = (
819
    None, # 0
820
    (1, TType.I32, 'entityType', None, None, ), # 1
821
    (2, TType.STRING, 'entityIdentifier', None, None, ), # 2
822
  )
823
 
824
  def __init__(self, entityType=None, entityIdentifier=None,):
825
    self.entityType = entityType
826
    self.entityIdentifier = entityIdentifier
827
 
828
  def read(self, iprot):
829
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
830
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
831
      return
832
    iprot.readStructBegin()
833
    while True:
834
      (fname, ftype, fid) = iprot.readFieldBegin()
835
      if ftype == TType.STOP:
836
        break
837
      if fid == 1:
838
        if ftype == TType.I32:
839
          self.entityType = iprot.readI32();
840
        else:
841
          iprot.skip(ftype)
842
      elif fid == 2:
843
        if ftype == TType.STRING:
844
          self.entityIdentifier = iprot.readString();
845
        else:
846
          iprot.skip(ftype)
847
      else:
848
        iprot.skip(ftype)
849
      iprot.readFieldEnd()
850
    iprot.readStructEnd()
851
 
852
  def write(self, oprot):
853
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
854
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
855
      return
856
    oprot.writeStructBegin('endMonitoringEntity_args')
857
    if self.entityType is not None:
858
      oprot.writeFieldBegin('entityType', TType.I32, 1)
859
      oprot.writeI32(self.entityType)
860
      oprot.writeFieldEnd()
861
    if self.entityIdentifier is not None:
862
      oprot.writeFieldBegin('entityIdentifier', TType.STRING, 2)
863
      oprot.writeString(self.entityIdentifier)
864
      oprot.writeFieldEnd()
865
    oprot.writeFieldStop()
866
    oprot.writeStructEnd()
867
 
868
  def validate(self):
869
    return
870
 
871
 
872
  def __repr__(self):
873
    L = ['%s=%r' % (key, value)
874
      for key, value in self.__dict__.iteritems()]
875
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
876
 
877
  def __eq__(self, other):
878
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
879
 
880
  def __ne__(self, other):
881
    return not (self == other)
882
 
883
class endMonitoringEntity_result:
884
  """
885
  Attributes:
886
   - e
887
  """
888
 
889
  thrift_spec = (
890
    None, # 0
891
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
892
  )
893
 
894
  def __init__(self, e=None,):
895
    self.e = e
896
 
897
  def read(self, iprot):
898
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
899
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
900
      return
901
    iprot.readStructBegin()
902
    while True:
903
      (fname, ftype, fid) = iprot.readFieldBegin()
904
      if ftype == TType.STOP:
905
        break
906
      if fid == 1:
907
        if ftype == TType.STRUCT:
908
          self.e = AlertServiceException()
909
          self.e.read(iprot)
910
        else:
911
          iprot.skip(ftype)
912
      else:
913
        iprot.skip(ftype)
914
      iprot.readFieldEnd()
915
    iprot.readStructEnd()
916
 
917
  def write(self, oprot):
918
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
919
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
920
      return
921
    oprot.writeStructBegin('endMonitoringEntity_result')
922
    if self.e is not None:
923
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
924
      self.e.write(oprot)
925
      oprot.writeFieldEnd()
926
    oprot.writeFieldStop()
927
    oprot.writeStructEnd()
928
 
929
  def validate(self):
930
    return
931
 
932
 
933
  def __repr__(self):
934
    L = ['%s=%r' % (key, value)
935
      for key, value in self.__dict__.iteritems()]
936
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
937
 
938
  def __eq__(self, other):
939
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
940
 
941
  def __ne__(self, other):
942
    return not (self == other)
943
 
944
class getEntities_args:
945
  """
946
  Attributes:
947
   - searchFilter
948
  """
949
 
950
  thrift_spec = (
951
    None, # 0
952
    (1, TType.STRUCT, 'searchFilter', (SearchFilter, SearchFilter.thrift_spec), None, ), # 1
953
  )
954
 
955
  def __init__(self, searchFilter=None,):
956
    self.searchFilter = searchFilter
957
 
958
  def read(self, iprot):
959
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
960
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
961
      return
962
    iprot.readStructBegin()
963
    while True:
964
      (fname, ftype, fid) = iprot.readFieldBegin()
965
      if ftype == TType.STOP:
966
        break
967
      if fid == 1:
968
        if ftype == TType.STRUCT:
969
          self.searchFilter = SearchFilter()
970
          self.searchFilter.read(iprot)
971
        else:
972
          iprot.skip(ftype)
973
      else:
974
        iprot.skip(ftype)
975
      iprot.readFieldEnd()
976
    iprot.readStructEnd()
977
 
978
  def write(self, oprot):
979
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
980
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
981
      return
982
    oprot.writeStructBegin('getEntities_args')
983
    if self.searchFilter is not None:
984
      oprot.writeFieldBegin('searchFilter', TType.STRUCT, 1)
985
      self.searchFilter.write(oprot)
986
      oprot.writeFieldEnd()
987
    oprot.writeFieldStop()
988
    oprot.writeStructEnd()
989
 
990
  def validate(self):
991
    return
992
 
993
 
994
  def __repr__(self):
995
    L = ['%s=%r' % (key, value)
996
      for key, value in self.__dict__.iteritems()]
997
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
998
 
999
  def __eq__(self, other):
1000
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1001
 
1002
  def __ne__(self, other):
1003
    return not (self == other)
1004
 
1005
class getEntities_result:
1006
  """
1007
  Attributes:
1008
   - success
1009
   - e
1010
  """
1011
 
1012
  thrift_spec = (
1013
    (0, TType.LIST, 'success', (TType.STRUCT,(MonitoredEntity, MonitoredEntity.thrift_spec)), None, ), # 0
1014
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
1015
  )
1016
 
1017
  def __init__(self, success=None, e=None,):
1018
    self.success = success
1019
    self.e = e
1020
 
1021
  def read(self, iprot):
1022
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1023
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1024
      return
1025
    iprot.readStructBegin()
1026
    while True:
1027
      (fname, ftype, fid) = iprot.readFieldBegin()
1028
      if ftype == TType.STOP:
1029
        break
1030
      if fid == 0:
1031
        if ftype == TType.LIST:
1032
          self.success = []
1033
          (_etype3, _size0) = iprot.readListBegin()
1034
          for _i4 in xrange(_size0):
1035
            _elem5 = MonitoredEntity()
1036
            _elem5.read(iprot)
1037
            self.success.append(_elem5)
1038
          iprot.readListEnd()
1039
        else:
1040
          iprot.skip(ftype)
1041
      elif fid == 1:
1042
        if ftype == TType.STRUCT:
1043
          self.e = AlertServiceException()
1044
          self.e.read(iprot)
1045
        else:
1046
          iprot.skip(ftype)
1047
      else:
1048
        iprot.skip(ftype)
1049
      iprot.readFieldEnd()
1050
    iprot.readStructEnd()
1051
 
1052
  def write(self, oprot):
1053
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1054
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1055
      return
1056
    oprot.writeStructBegin('getEntities_result')
1057
    if self.success is not None:
1058
      oprot.writeFieldBegin('success', TType.LIST, 0)
1059
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1060
      for iter6 in self.success:
1061
        iter6.write(oprot)
1062
      oprot.writeListEnd()
1063
      oprot.writeFieldEnd()
1064
    if self.e is not None:
1065
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1066
      self.e.write(oprot)
1067
      oprot.writeFieldEnd()
1068
    oprot.writeFieldStop()
1069
    oprot.writeStructEnd()
1070
 
1071
  def validate(self):
1072
    return
1073
 
1074
 
1075
  def __repr__(self):
1076
    L = ['%s=%r' % (key, value)
1077
      for key, value in self.__dict__.iteritems()]
1078
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1079
 
1080
  def __eq__(self, other):
1081
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1082
 
1083
  def __ne__(self, other):
1084
    return not (self == other)
1085
 
1086
class getAlertedEntities_args:
1087
  """
1088
  Attributes:
1089
   - searchFilter
1090
  """
1091
 
1092
  thrift_spec = (
1093
    None, # 0
1094
    (1, TType.STRUCT, 'searchFilter', (SearchFilter, SearchFilter.thrift_spec), None, ), # 1
1095
  )
1096
 
1097
  def __init__(self, searchFilter=None,):
1098
    self.searchFilter = searchFilter
1099
 
1100
  def read(self, iprot):
1101
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1102
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1103
      return
1104
    iprot.readStructBegin()
1105
    while True:
1106
      (fname, ftype, fid) = iprot.readFieldBegin()
1107
      if ftype == TType.STOP:
1108
        break
1109
      if fid == 1:
1110
        if ftype == TType.STRUCT:
1111
          self.searchFilter = SearchFilter()
1112
          self.searchFilter.read(iprot)
1113
        else:
1114
          iprot.skip(ftype)
1115
      else:
1116
        iprot.skip(ftype)
1117
      iprot.readFieldEnd()
1118
    iprot.readStructEnd()
1119
 
1120
  def write(self, oprot):
1121
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1122
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1123
      return
1124
    oprot.writeStructBegin('getAlertedEntities_args')
1125
    if self.searchFilter is not None:
1126
      oprot.writeFieldBegin('searchFilter', TType.STRUCT, 1)
1127
      self.searchFilter.write(oprot)
1128
      oprot.writeFieldEnd()
1129
    oprot.writeFieldStop()
1130
    oprot.writeStructEnd()
1131
 
1132
  def validate(self):
1133
    return
1134
 
1135
 
1136
  def __repr__(self):
1137
    L = ['%s=%r' % (key, value)
1138
      for key, value in self.__dict__.iteritems()]
1139
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1140
 
1141
  def __eq__(self, other):
1142
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1143
 
1144
  def __ne__(self, other):
1145
    return not (self == other)
1146
 
1147
class getAlertedEntities_result:
1148
  """
1149
  Attributes:
1150
   - success
1151
   - e
1152
  """
1153
 
1154
  thrift_spec = (
1155
    (0, TType.LIST, 'success', (TType.STRUCT,(AlertedEntity, AlertedEntity.thrift_spec)), None, ), # 0
1156
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
1157
  )
1158
 
1159
  def __init__(self, success=None, e=None,):
1160
    self.success = success
1161
    self.e = e
1162
 
1163
  def read(self, iprot):
1164
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1165
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1166
      return
1167
    iprot.readStructBegin()
1168
    while True:
1169
      (fname, ftype, fid) = iprot.readFieldBegin()
1170
      if ftype == TType.STOP:
1171
        break
1172
      if fid == 0:
1173
        if ftype == TType.LIST:
1174
          self.success = []
1175
          (_etype10, _size7) = iprot.readListBegin()
1176
          for _i11 in xrange(_size7):
1177
            _elem12 = AlertedEntity()
1178
            _elem12.read(iprot)
1179
            self.success.append(_elem12)
1180
          iprot.readListEnd()
1181
        else:
1182
          iprot.skip(ftype)
1183
      elif fid == 1:
1184
        if ftype == TType.STRUCT:
1185
          self.e = AlertServiceException()
1186
          self.e.read(iprot)
1187
        else:
1188
          iprot.skip(ftype)
1189
      else:
1190
        iprot.skip(ftype)
1191
      iprot.readFieldEnd()
1192
    iprot.readStructEnd()
1193
 
1194
  def write(self, oprot):
1195
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1196
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1197
      return
1198
    oprot.writeStructBegin('getAlertedEntities_result')
1199
    if self.success is not None:
1200
      oprot.writeFieldBegin('success', TType.LIST, 0)
1201
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1202
      for iter13 in self.success:
1203
        iter13.write(oprot)
1204
      oprot.writeListEnd()
1205
      oprot.writeFieldEnd()
1206
    if self.e is not None:
1207
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1208
      self.e.write(oprot)
1209
      oprot.writeFieldEnd()
1210
    oprot.writeFieldStop()
1211
    oprot.writeStructEnd()
1212
 
1213
  def validate(self):
1214
    return
1215
 
1216
 
1217
  def __repr__(self):
1218
    L = ['%s=%r' % (key, value)
1219
      for key, value in self.__dict__.iteritems()]
1220
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1221
 
1222
  def __eq__(self, other):
1223
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1224
 
1225
  def __ne__(self, other):
1226
    return not (self == other)
1227
 
1228
class getAlertMapper_args:
1229
  """
1230
  Attributes:
1231
   - entityType
1232
   - eventType
1233
  """
1234
 
1235
  thrift_spec = (
1236
    None, # 0
1237
    (1, TType.I32, 'entityType', None, None, ), # 1
1238
    (2, TType.I32, 'eventType', None, None, ), # 2
1239
  )
1240
 
1241
  def __init__(self, entityType=None, eventType=None,):
1242
    self.entityType = entityType
1243
    self.eventType = eventType
1244
 
1245
  def read(self, iprot):
1246
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1247
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1248
      return
1249
    iprot.readStructBegin()
1250
    while True:
1251
      (fname, ftype, fid) = iprot.readFieldBegin()
1252
      if ftype == TType.STOP:
1253
        break
1254
      if fid == 1:
1255
        if ftype == TType.I32:
1256
          self.entityType = iprot.readI32();
1257
        else:
1258
          iprot.skip(ftype)
1259
      elif fid == 2:
1260
        if ftype == TType.I32:
1261
          self.eventType = iprot.readI32();
1262
        else:
1263
          iprot.skip(ftype)
1264
      else:
1265
        iprot.skip(ftype)
1266
      iprot.readFieldEnd()
1267
    iprot.readStructEnd()
1268
 
1269
  def write(self, oprot):
1270
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1271
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1272
      return
1273
    oprot.writeStructBegin('getAlertMapper_args')
1274
    if self.entityType is not None:
1275
      oprot.writeFieldBegin('entityType', TType.I32, 1)
1276
      oprot.writeI32(self.entityType)
1277
      oprot.writeFieldEnd()
1278
    if self.eventType is not None:
1279
      oprot.writeFieldBegin('eventType', TType.I32, 2)
1280
      oprot.writeI32(self.eventType)
1281
      oprot.writeFieldEnd()
1282
    oprot.writeFieldStop()
1283
    oprot.writeStructEnd()
1284
 
1285
  def validate(self):
1286
    return
1287
 
1288
 
1289
  def __repr__(self):
1290
    L = ['%s=%r' % (key, value)
1291
      for key, value in self.__dict__.iteritems()]
1292
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1293
 
1294
  def __eq__(self, other):
1295
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1296
 
1297
  def __ne__(self, other):
1298
    return not (self == other)
1299
 
1300
class getAlertMapper_result:
1301
  """
1302
  Attributes:
1303
   - success
1304
   - e
1305
  """
1306
 
1307
  thrift_spec = (
1308
    (0, TType.STRUCT, 'success', (AlertMapper, AlertMapper.thrift_spec), None, ), # 0
1309
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
1310
  )
1311
 
1312
  def __init__(self, success=None, e=None,):
1313
    self.success = success
1314
    self.e = e
1315
 
1316
  def read(self, iprot):
1317
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1318
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1319
      return
1320
    iprot.readStructBegin()
1321
    while True:
1322
      (fname, ftype, fid) = iprot.readFieldBegin()
1323
      if ftype == TType.STOP:
1324
        break
1325
      if fid == 0:
1326
        if ftype == TType.STRUCT:
1327
          self.success = AlertMapper()
1328
          self.success.read(iprot)
1329
        else:
1330
          iprot.skip(ftype)
1331
      elif fid == 1:
1332
        if ftype == TType.STRUCT:
1333
          self.e = AlertServiceException()
1334
          self.e.read(iprot)
1335
        else:
1336
          iprot.skip(ftype)
1337
      else:
1338
        iprot.skip(ftype)
1339
      iprot.readFieldEnd()
1340
    iprot.readStructEnd()
1341
 
1342
  def write(self, oprot):
1343
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1344
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1345
      return
1346
    oprot.writeStructBegin('getAlertMapper_result')
1347
    if self.success is not None:
1348
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1349
      self.success.write(oprot)
1350
      oprot.writeFieldEnd()
1351
    if self.e is not None:
1352
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1353
      self.e.write(oprot)
1354
      oprot.writeFieldEnd()
1355
    oprot.writeFieldStop()
1356
    oprot.writeStructEnd()
1357
 
1358
  def validate(self):
1359
    return
1360
 
1361
 
1362
  def __repr__(self):
1363
    L = ['%s=%r' % (key, value)
1364
      for key, value in self.__dict__.iteritems()]
1365
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1366
 
1367
  def __eq__(self, other):
1368
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1369
 
1370
  def __ne__(self, other):
1371
    return not (self == other)
1372
 
1373
class activateEntityMonitoring_args:
1374
  """
1375
  Attributes:
1376
   - entityType
1377
   - userIds
1378
  """
1379
 
1380
  thrift_spec = (
1381
    None, # 0
1382
    (1, TType.I32, 'entityType', None, None, ), # 1
1383
    (2, TType.STRING, 'userIds', None, None, ), # 2
1384
  )
1385
 
1386
  def __init__(self, entityType=None, userIds=None,):
1387
    self.entityType = entityType
1388
    self.userIds = userIds
1389
 
1390
  def read(self, iprot):
1391
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1392
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1393
      return
1394
    iprot.readStructBegin()
1395
    while True:
1396
      (fname, ftype, fid) = iprot.readFieldBegin()
1397
      if ftype == TType.STOP:
1398
        break
1399
      if fid == 1:
1400
        if ftype == TType.I32:
1401
          self.entityType = iprot.readI32();
1402
        else:
1403
          iprot.skip(ftype)
1404
      elif fid == 2:
1405
        if ftype == TType.STRING:
1406
          self.userIds = iprot.readString();
1407
        else:
1408
          iprot.skip(ftype)
1409
      else:
1410
        iprot.skip(ftype)
1411
      iprot.readFieldEnd()
1412
    iprot.readStructEnd()
1413
 
1414
  def write(self, oprot):
1415
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1416
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1417
      return
1418
    oprot.writeStructBegin('activateEntityMonitoring_args')
1419
    if self.entityType is not None:
1420
      oprot.writeFieldBegin('entityType', TType.I32, 1)
1421
      oprot.writeI32(self.entityType)
1422
      oprot.writeFieldEnd()
1423
    if self.userIds is not None:
1424
      oprot.writeFieldBegin('userIds', TType.STRING, 2)
1425
      oprot.writeString(self.userIds)
1426
      oprot.writeFieldEnd()
1427
    oprot.writeFieldStop()
1428
    oprot.writeStructEnd()
1429
 
1430
  def validate(self):
1431
    return
1432
 
1433
 
1434
  def __repr__(self):
1435
    L = ['%s=%r' % (key, value)
1436
      for key, value in self.__dict__.iteritems()]
1437
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1438
 
1439
  def __eq__(self, other):
1440
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1441
 
1442
  def __ne__(self, other):
1443
    return not (self == other)
1444
 
1445
class activateEntityMonitoring_result:
1446
  """
1447
  Attributes:
1448
   - e
1449
  """
1450
 
1451
  thrift_spec = (
1452
    None, # 0
1453
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
1454
  )
1455
 
1456
  def __init__(self, e=None,):
1457
    self.e = e
1458
 
1459
  def read(self, iprot):
1460
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1461
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1462
      return
1463
    iprot.readStructBegin()
1464
    while True:
1465
      (fname, ftype, fid) = iprot.readFieldBegin()
1466
      if ftype == TType.STOP:
1467
        break
1468
      if fid == 1:
1469
        if ftype == TType.STRUCT:
1470
          self.e = AlertServiceException()
1471
          self.e.read(iprot)
1472
        else:
1473
          iprot.skip(ftype)
1474
      else:
1475
        iprot.skip(ftype)
1476
      iprot.readFieldEnd()
1477
    iprot.readStructEnd()
1478
 
1479
  def write(self, oprot):
1480
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1481
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1482
      return
1483
    oprot.writeStructBegin('activateEntityMonitoring_result')
1484
    if self.e is not None:
1485
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1486
      self.e.write(oprot)
1487
      oprot.writeFieldEnd()
1488
    oprot.writeFieldStop()
1489
    oprot.writeStructEnd()
1490
 
1491
  def validate(self):
1492
    return
1493
 
1494
 
1495
  def __repr__(self):
1496
    L = ['%s=%r' % (key, value)
1497
      for key, value in self.__dict__.iteritems()]
1498
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1499
 
1500
  def __eq__(self, other):
1501
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1502
 
1503
  def __ne__(self, other):
1504
    return not (self == other)
1505
 
1506
class deActivateEntityMonitoring_args:
1507
  """
1508
  Attributes:
1509
   - entityType
1510
  """
1511
 
1512
  thrift_spec = (
1513
    None, # 0
1514
    (1, TType.I32, 'entityType', None, None, ), # 1
1515
  )
1516
 
1517
  def __init__(self, entityType=None,):
1518
    self.entityType = entityType
1519
 
1520
  def read(self, iprot):
1521
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1522
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1523
      return
1524
    iprot.readStructBegin()
1525
    while True:
1526
      (fname, ftype, fid) = iprot.readFieldBegin()
1527
      if ftype == TType.STOP:
1528
        break
1529
      if fid == 1:
1530
        if ftype == TType.I32:
1531
          self.entityType = iprot.readI32();
1532
        else:
1533
          iprot.skip(ftype)
1534
      else:
1535
        iprot.skip(ftype)
1536
      iprot.readFieldEnd()
1537
    iprot.readStructEnd()
1538
 
1539
  def write(self, oprot):
1540
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1541
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1542
      return
1543
    oprot.writeStructBegin('deActivateEntityMonitoring_args')
1544
    if self.entityType is not None:
1545
      oprot.writeFieldBegin('entityType', TType.I32, 1)
1546
      oprot.writeI32(self.entityType)
1547
      oprot.writeFieldEnd()
1548
    oprot.writeFieldStop()
1549
    oprot.writeStructEnd()
1550
 
1551
  def validate(self):
1552
    return
1553
 
1554
 
1555
  def __repr__(self):
1556
    L = ['%s=%r' % (key, value)
1557
      for key, value in self.__dict__.iteritems()]
1558
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1559
 
1560
  def __eq__(self, other):
1561
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1562
 
1563
  def __ne__(self, other):
1564
    return not (self == other)
1565
 
1566
class deActivateEntityMonitoring_result:
1567
  """
1568
  Attributes:
1569
   - e
1570
  """
1571
 
1572
  thrift_spec = (
1573
    None, # 0
1574
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
1575
  )
1576
 
1577
  def __init__(self, e=None,):
1578
    self.e = e
1579
 
1580
  def read(self, iprot):
1581
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1582
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1583
      return
1584
    iprot.readStructBegin()
1585
    while True:
1586
      (fname, ftype, fid) = iprot.readFieldBegin()
1587
      if ftype == TType.STOP:
1588
        break
1589
      if fid == 1:
1590
        if ftype == TType.STRUCT:
1591
          self.e = AlertServiceException()
1592
          self.e.read(iprot)
1593
        else:
1594
          iprot.skip(ftype)
1595
      else:
1596
        iprot.skip(ftype)
1597
      iprot.readFieldEnd()
1598
    iprot.readStructEnd()
1599
 
1600
  def write(self, oprot):
1601
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1602
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1603
      return
1604
    oprot.writeStructBegin('deActivateEntityMonitoring_result')
1605
    if self.e is not None:
1606
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1607
      self.e.write(oprot)
1608
      oprot.writeFieldEnd()
1609
    oprot.writeFieldStop()
1610
    oprot.writeStructEnd()
1611
 
1612
  def validate(self):
1613
    return
1614
 
1615
 
1616
  def __repr__(self):
1617
    L = ['%s=%r' % (key, value)
1618
      for key, value in self.__dict__.iteritems()]
1619
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1620
 
1621
  def __eq__(self, other):
1622
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1623
 
1624
  def __ne__(self, other):
1625
    return not (self == other)
1626
 
1627
class registerEventType_args:
1628
  """
1629
  Attributes:
1630
   - alertMap
1631
  """
1632
 
1633
  thrift_spec = (
1634
    None, # 0
1635
    (1, TType.STRUCT, 'alertMap', (AlertMapper, AlertMapper.thrift_spec), None, ), # 1
1636
  )
1637
 
1638
  def __init__(self, alertMap=None,):
1639
    self.alertMap = alertMap
1640
 
1641
  def read(self, iprot):
1642
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1643
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1644
      return
1645
    iprot.readStructBegin()
1646
    while True:
1647
      (fname, ftype, fid) = iprot.readFieldBegin()
1648
      if ftype == TType.STOP:
1649
        break
1650
      if fid == 1:
1651
        if ftype == TType.STRUCT:
1652
          self.alertMap = AlertMapper()
1653
          self.alertMap.read(iprot)
1654
        else:
1655
          iprot.skip(ftype)
1656
      else:
1657
        iprot.skip(ftype)
1658
      iprot.readFieldEnd()
1659
    iprot.readStructEnd()
1660
 
1661
  def write(self, oprot):
1662
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1663
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1664
      return
1665
    oprot.writeStructBegin('registerEventType_args')
1666
    if self.alertMap is not None:
1667
      oprot.writeFieldBegin('alertMap', TType.STRUCT, 1)
1668
      self.alertMap.write(oprot)
1669
      oprot.writeFieldEnd()
1670
    oprot.writeFieldStop()
1671
    oprot.writeStructEnd()
1672
 
1673
  def validate(self):
1674
    return
1675
 
1676
 
1677
  def __repr__(self):
1678
    L = ['%s=%r' % (key, value)
1679
      for key, value in self.__dict__.iteritems()]
1680
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1681
 
1682
  def __eq__(self, other):
1683
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1684
 
1685
  def __ne__(self, other):
1686
    return not (self == other)
1687
 
1688
class registerEventType_result:
1689
  """
1690
  Attributes:
1691
   - e
1692
  """
1693
 
1694
  thrift_spec = (
1695
    None, # 0
1696
    (1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1
1697
  )
1698
 
1699
  def __init__(self, e=None,):
1700
    self.e = e
1701
 
1702
  def read(self, iprot):
1703
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1704
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1705
      return
1706
    iprot.readStructBegin()
1707
    while True:
1708
      (fname, ftype, fid) = iprot.readFieldBegin()
1709
      if ftype == TType.STOP:
1710
        break
1711
      if fid == 1:
1712
        if ftype == TType.STRUCT:
1713
          self.e = AlertServiceException()
1714
          self.e.read(iprot)
1715
        else:
1716
          iprot.skip(ftype)
1717
      else:
1718
        iprot.skip(ftype)
1719
      iprot.readFieldEnd()
1720
    iprot.readStructEnd()
1721
 
1722
  def write(self, oprot):
1723
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1724
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1725
      return
1726
    oprot.writeStructBegin('registerEventType_result')
1727
    if self.e is not None:
1728
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1729
      self.e.write(oprot)
1730
      oprot.writeFieldEnd()
1731
    oprot.writeFieldStop()
1732
    oprot.writeStructEnd()
1733
 
1734
  def validate(self):
1735
    return
1736
 
1737
 
1738
  def __repr__(self):
1739
    L = ['%s=%r' % (key, value)
1740
      for key, value in self.__dict__.iteritems()]
1741
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1742
 
1743
  def __eq__(self, other):
1744
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1745
 
1746
  def __ne__(self, other):
1747
    return not (self == other)