Subversion Repositories SmartDukaan

Rev

Rev 18709 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#
# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

from thrift.Thrift import *
import shop2020.thriftpy.generic.ttypes


from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None


class TicketPriority:
  LOW = 0
  HIGH = 1
  MEDIUM = 2

  _VALUES_TO_NAMES = {
    0: "LOW",
    1: "HIGH",
    2: "MEDIUM",
  }

  _NAMES_TO_VALUES = {
    "LOW": 0,
    "HIGH": 1,
    "MEDIUM": 2,
  }

class TicketStatus:
  OPEN = 0
  CLOSED = 1
  REOPEN = 2

  _VALUES_TO_NAMES = {
    0: "OPEN",
    1: "CLOSED",
    2: "REOPEN",
  }

  _NAMES_TO_VALUES = {
    "OPEN": 0,
    "CLOSED": 1,
    "REOPEN": 2,
  }

class TicketCategory:
  RETURN_FORM = 1
  ORDER_CANCELLATION = 2
  DELIVERY_PROBLEM = 3
  PAYMENT_STATUS = 4
  ORDER_STATUS = 5
  PRODUCT_REQUEST = 6
  RECHARGE_RELATED = 7
  OTHER = 8
  COD_VERIFICATION = 9
  FAILED_PAYMENTS = 10
  DELAYED_DELIVERY = 11
  PAYMENT_FLAGGED = 12
  DOA_RECEIVED = 13
  PRODUCT_PROCUREMENT = 14
  UNDELIVERED = 15
  CATEGORY = 16
  STORE_PICKUP = 17
  ON_TIME_GUARANTEE = 18
  LOW_INVENTORY_CANCELLED_ORDERS = 19
  RTO_REFUND = 20
  Bulk_Order_ENQUIRY = 21
  PROFITMANDI_FEEDBACK = 22
  PROFITMANDI_ORDER_NOT_SEEN = 23
  PROFITMANDI_CASHBACK = 24
  PROFITMANDI_RECHARGE_ISSUE = 25
  PROFITMANDI_OTHER = 26
  PROFITMANDI_ORDER_TRACKING_ISSUE = 27
  PROFITMANDI_REFUND_PROBLEM = 28
  PROFITMANDI_TECHNICAL_PROBLEM = 29
  PROFITMANDI_PRODUCT_ISSUE = 30
  PROFITMANDI_DELAYED_DELIVERY = 31
  DELIVERY_ATTEMPT_FAILED = 32

  _VALUES_TO_NAMES = {
    1: "RETURN_FORM",
    2: "ORDER_CANCELLATION",
    3: "DELIVERY_PROBLEM",
    4: "PAYMENT_STATUS",
    5: "ORDER_STATUS",
    6: "PRODUCT_REQUEST",
    7: "RECHARGE_RELATED",
    8: "OTHER",
    9: "COD_VERIFICATION",
    10: "FAILED_PAYMENTS",
    11: "DELAYED_DELIVERY",
    12: "PAYMENT_FLAGGED",
    13: "DOA_RECEIVED",
    14: "PRODUCT_PROCUREMENT",
    15: "UNDELIVERED",
    16: "CATEGORY",
    17: "STORE_PICKUP",
    18: "ON_TIME_GUARANTEE",
    19: "LOW_INVENTORY_CANCELLED_ORDERS",
    20: "RTO_REFUND",
    21: "Bulk_Order_ENQUIRY",
    22: "PROFITMANDI_FEEDBACK",
    23: "PROFITMANDI_ORDER_NOT_SEEN",
    24: "PROFITMANDI_CASHBACK",
    25: "PROFITMANDI_RECHARGE_ISSUE",
    26: "PROFITMANDI_OTHER",
    27: "PROFITMANDI_ORDER_TRACKING_ISSUE",
    28: "PROFITMANDI_REFUND_PROBLEM",
    29: "PROFITMANDI_TECHNICAL_PROBLEM",
    30: "PROFITMANDI_PRODUCT_ISSUE",
    31: "PROFITMANDI_DELAYED_DELIVERY",
    32: "DELIVERY_ATTEMPT_FAILED",
  }

  _NAMES_TO_VALUES = {
    "RETURN_FORM": 1,
    "ORDER_CANCELLATION": 2,
    "DELIVERY_PROBLEM": 3,
    "PAYMENT_STATUS": 4,
    "ORDER_STATUS": 5,
    "PRODUCT_REQUEST": 6,
    "RECHARGE_RELATED": 7,
    "OTHER": 8,
    "COD_VERIFICATION": 9,
    "FAILED_PAYMENTS": 10,
    "DELAYED_DELIVERY": 11,
    "PAYMENT_FLAGGED": 12,
    "DOA_RECEIVED": 13,
    "PRODUCT_PROCUREMENT": 14,
    "UNDELIVERED": 15,
    "CATEGORY": 16,
    "STORE_PICKUP": 17,
    "ON_TIME_GUARANTEE": 18,
    "LOW_INVENTORY_CANCELLED_ORDERS": 19,
    "RTO_REFUND": 20,
    "Bulk_Order_ENQUIRY": 21,
    "PROFITMANDI_FEEDBACK": 22,
    "PROFITMANDI_ORDER_NOT_SEEN": 23,
    "PROFITMANDI_CASHBACK": 24,
    "PROFITMANDI_RECHARGE_ISSUE": 25,
    "PROFITMANDI_OTHER": 26,
    "PROFITMANDI_ORDER_TRACKING_ISSUE": 27,
    "PROFITMANDI_REFUND_PROBLEM": 28,
    "PROFITMANDI_TECHNICAL_PROBLEM": 29,
    "PROFITMANDI_PRODUCT_ISSUE": 30,
    "PROFITMANDI_DELAYED_DELIVERY": 31,
    "DELIVERY_ATTEMPT_FAILED": 32,
  }

class ActivityType:
  SEND_EMAIL_TO_CUSTOMER = 1
  RECEIVED_EMAIL_FROM_CUSTOMER = 2
  CALLED_CUSTOMER = 3
  RECEIVED_CALL_FROM_CUSTOMER = 4
  OTHER = 5
  ESCALATE_TICKET = 6
  PROFITMANDI_CRM_APP_TICKET = 7

  _VALUES_TO_NAMES = {
    1: "SEND_EMAIL_TO_CUSTOMER",
    2: "RECEIVED_EMAIL_FROM_CUSTOMER",
    3: "CALLED_CUSTOMER",
    4: "RECEIVED_CALL_FROM_CUSTOMER",
    5: "OTHER",
    6: "ESCALATE_TICKET",
    7: "PROFITMANDI_CRM_APP_TICKET",
  }

  _NAMES_TO_VALUES = {
    "SEND_EMAIL_TO_CUSTOMER": 1,
    "RECEIVED_EMAIL_FROM_CUSTOMER": 2,
    "CALLED_CUSTOMER": 3,
    "RECEIVED_CALL_FROM_CUSTOMER": 4,
    "OTHER": 5,
    "ESCALATE_TICKET": 6,
    "PROFITMANDI_CRM_APP_TICKET": 7,
  }


class Agent:
  """
  Attributes:
   - id
   - name
   - emailId
   - managerId
   - password
   - is_active
   - is_pmCrmUser
   - is_allAssignable
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.STRING, 'emailId', None, None, ), # 3
    (4, TType.I64, 'managerId', None, None, ), # 4
    (5, TType.STRING, 'password', None, None, ), # 5
    (6, TType.BOOL, 'is_active', None, None, ), # 6
    (7, TType.BOOL, 'is_pmCrmUser', None, None, ), # 7
    (8, TType.BOOL, 'is_allAssignable', None, None, ), # 8
  )

  def __init__(self, id=None, name=None, emailId=None, managerId=None, password=None, is_active=None, is_pmCrmUser=None, is_allAssignable=None,):
    self.id = id
    self.name = name
    self.emailId = emailId
    self.managerId = managerId
    self.password = password
    self.is_active = is_active
    self.is_pmCrmUser = is_pmCrmUser
    self.is_allAssignable = is_allAssignable

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.emailId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.managerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.password = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.is_active = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.is_pmCrmUser = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.BOOL:
          self.is_allAssignable = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Agent')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.emailId is not None:
      oprot.writeFieldBegin('emailId', TType.STRING, 3)
      oprot.writeString(self.emailId)
      oprot.writeFieldEnd()
    if self.managerId is not None:
      oprot.writeFieldBegin('managerId', TType.I64, 4)
      oprot.writeI64(self.managerId)
      oprot.writeFieldEnd()
    if self.password is not None:
      oprot.writeFieldBegin('password', TType.STRING, 5)
      oprot.writeString(self.password)
      oprot.writeFieldEnd()
    if self.is_active is not None:
      oprot.writeFieldBegin('is_active', TType.BOOL, 6)
      oprot.writeBool(self.is_active)
      oprot.writeFieldEnd()
    if self.is_pmCrmUser is not None:
      oprot.writeFieldBegin('is_pmCrmUser', TType.BOOL, 7)
      oprot.writeBool(self.is_pmCrmUser)
      oprot.writeFieldEnd()
    if self.is_allAssignable is not None:
      oprot.writeFieldBegin('is_allAssignable', TType.BOOL, 8)
      oprot.writeBool(self.is_allAssignable)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Ticket:
  """
  Attributes:
   - id
   - customerId
   - openDate
   - closeDate
   - description
   - priority
   - category
   - status
   - assigneeId
   - creatorId
   - orderId
   - airwayBillNo
   - productName
   - customerMobileNumber
   - customerEmailId
   - customerName
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'customerId', None, None, ), # 2
    (3, TType.I64, 'openDate', None, None, ), # 3
    (4, TType.I64, 'closeDate', None, None, ), # 4
    (5, TType.STRING, 'description', None, None, ), # 5
    (6, TType.I32, 'priority', None, None, ), # 6
    (7, TType.I32, 'category', None, None, ), # 7
    (8, TType.I32, 'status', None, None, ), # 8
    (9, TType.I64, 'assigneeId', None, None, ), # 9
    (10, TType.I64, 'creatorId', None, None, ), # 10
    (11, TType.I64, 'orderId', None, None, ), # 11
    (12, TType.STRING, 'airwayBillNo', None, None, ), # 12
    (13, TType.STRING, 'productName', None, None, ), # 13
    (14, TType.STRING, 'customerMobileNumber', None, None, ), # 14
    (15, TType.STRING, 'customerEmailId', None, None, ), # 15
    (16, TType.STRING, 'customerName', None, None, ), # 16
  )

  def __init__(self, id=None, customerId=None, openDate=None, closeDate=None, description=None, priority=None, category=None, status=None, assigneeId=None, creatorId=None, orderId=None, airwayBillNo=None, productName=None, customerMobileNumber=None, customerEmailId=None, customerName=None,):
    self.id = id
    self.customerId = customerId
    self.openDate = openDate
    self.closeDate = closeDate
    self.description = description
    self.priority = priority
    self.category = category
    self.status = status
    self.assigneeId = assigneeId
    self.creatorId = creatorId
    self.orderId = orderId
    self.airwayBillNo = airwayBillNo
    self.productName = productName
    self.customerMobileNumber = customerMobileNumber
    self.customerEmailId = customerEmailId
    self.customerName = customerName

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.openDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.closeDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.description = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.priority = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.category = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.assigneeId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.creatorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.airwayBillNo = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.productName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.STRING:
          self.customerMobileNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.customerEmailId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.STRING:
          self.customerName = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Ticket')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 2)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    if self.openDate is not None:
      oprot.writeFieldBegin('openDate', TType.I64, 3)
      oprot.writeI64(self.openDate)
      oprot.writeFieldEnd()
    if self.closeDate is not None:
      oprot.writeFieldBegin('closeDate', TType.I64, 4)
      oprot.writeI64(self.closeDate)
      oprot.writeFieldEnd()
    if self.description is not None:
      oprot.writeFieldBegin('description', TType.STRING, 5)
      oprot.writeString(self.description)
      oprot.writeFieldEnd()
    if self.priority is not None:
      oprot.writeFieldBegin('priority', TType.I32, 6)
      oprot.writeI32(self.priority)
      oprot.writeFieldEnd()
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.I32, 7)
      oprot.writeI32(self.category)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 8)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.assigneeId is not None:
      oprot.writeFieldBegin('assigneeId', TType.I64, 9)
      oprot.writeI64(self.assigneeId)
      oprot.writeFieldEnd()
    if self.creatorId is not None:
      oprot.writeFieldBegin('creatorId', TType.I64, 10)
      oprot.writeI64(self.creatorId)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 11)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.airwayBillNo is not None:
      oprot.writeFieldBegin('airwayBillNo', TType.STRING, 12)
      oprot.writeString(self.airwayBillNo)
      oprot.writeFieldEnd()
    if self.productName is not None:
      oprot.writeFieldBegin('productName', TType.STRING, 13)
      oprot.writeString(self.productName)
      oprot.writeFieldEnd()
    if self.customerMobileNumber is not None:
      oprot.writeFieldBegin('customerMobileNumber', TType.STRING, 14)
      oprot.writeString(self.customerMobileNumber)
      oprot.writeFieldEnd()
    if self.customerEmailId is not None:
      oprot.writeFieldBegin('customerEmailId', TType.STRING, 15)
      oprot.writeString(self.customerEmailId)
      oprot.writeFieldEnd()
    if self.customerName is not None:
      oprot.writeFieldBegin('customerName', TType.STRING, 16)
      oprot.writeString(self.customerName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Activity:
  """
  Attributes:
   - id
   - description
   - creationTimestamp
   - type
   - customerId
   - creatorId
   - userEmailId
   - ticketId
   - ticketPriority
   - ticketAssigneeId
   - ticketStatus
   - ticketCategory
   - ticketDescription
   - isRead
   - customerMobileNumber
   - customerEmailId
   - customerName
   - attachments
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'description', None, None, ), # 2
    (3, TType.I64, 'creationTimestamp', None, None, ), # 3
    (4, TType.I32, 'type', None, None, ), # 4
    (5, TType.I64, 'customerId', None, None, ), # 5
    (6, TType.I64, 'creatorId', None, None, ), # 6
    (7, TType.I64, 'userEmailId', None, None, ), # 7
    (8, TType.I64, 'ticketId', None, None, ), # 8
    (9, TType.I32, 'ticketPriority', None, None, ), # 9
    (10, TType.I64, 'ticketAssigneeId', None, None, ), # 10
    (11, TType.I32, 'ticketStatus', None, None, ), # 11
    (12, TType.I32, 'ticketCategory', None, None, ), # 12
    (13, TType.STRING, 'ticketDescription', None, None, ), # 13
    (14, TType.BOOL, 'isRead', None, None, ), # 14
    (15, TType.STRING, 'customerMobileNumber', None, None, ), # 15
    (16, TType.STRING, 'customerEmailId', None, None, ), # 16
    (17, TType.STRING, 'customerName', None, None, ), # 17
    (18, TType.STRING, 'attachments', None, None, ), # 18
  )

  def __init__(self, id=None, description=None, creationTimestamp=None, type=None, customerId=None, creatorId=None, userEmailId=None, ticketId=None, ticketPriority=None, ticketAssigneeId=None, ticketStatus=None, ticketCategory=None, ticketDescription=None, isRead=None, customerMobileNumber=None, customerEmailId=None, customerName=None, attachments=None,):
    self.id = id
    self.description = description
    self.creationTimestamp = creationTimestamp
    self.type = type
    self.customerId = customerId
    self.creatorId = creatorId
    self.userEmailId = userEmailId
    self.ticketId = ticketId
    self.ticketPriority = ticketPriority
    self.ticketAssigneeId = ticketAssigneeId
    self.ticketStatus = ticketStatus
    self.ticketCategory = ticketCategory
    self.ticketDescription = ticketDescription
    self.isRead = isRead
    self.customerMobileNumber = customerMobileNumber
    self.customerEmailId = customerEmailId
    self.customerName = customerName
    self.attachments = attachments

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.description = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.creationTimestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.creatorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.userEmailId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.ticketId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I32:
          self.ticketPriority = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.ticketAssigneeId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I32:
          self.ticketStatus = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I32:
          self.ticketCategory = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.ticketDescription = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.BOOL:
          self.isRead = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.customerMobileNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.STRING:
          self.customerEmailId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRING:
          self.customerName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.STRING:
          self.attachments = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Activity')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.description is not None:
      oprot.writeFieldBegin('description', TType.STRING, 2)
      oprot.writeString(self.description)
      oprot.writeFieldEnd()
    if self.creationTimestamp is not None:
      oprot.writeFieldBegin('creationTimestamp', TType.I64, 3)
      oprot.writeI64(self.creationTimestamp)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 4)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 5)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    if self.creatorId is not None:
      oprot.writeFieldBegin('creatorId', TType.I64, 6)
      oprot.writeI64(self.creatorId)
      oprot.writeFieldEnd()
    if self.userEmailId is not None:
      oprot.writeFieldBegin('userEmailId', TType.I64, 7)
      oprot.writeI64(self.userEmailId)
      oprot.writeFieldEnd()
    if self.ticketId is not None:
      oprot.writeFieldBegin('ticketId', TType.I64, 8)
      oprot.writeI64(self.ticketId)
      oprot.writeFieldEnd()
    if self.ticketPriority is not None:
      oprot.writeFieldBegin('ticketPriority', TType.I32, 9)
      oprot.writeI32(self.ticketPriority)
      oprot.writeFieldEnd()
    if self.ticketAssigneeId is not None:
      oprot.writeFieldBegin('ticketAssigneeId', TType.I64, 10)
      oprot.writeI64(self.ticketAssigneeId)
      oprot.writeFieldEnd()
    if self.ticketStatus is not None:
      oprot.writeFieldBegin('ticketStatus', TType.I32, 11)
      oprot.writeI32(self.ticketStatus)
      oprot.writeFieldEnd()
    if self.ticketCategory is not None:
      oprot.writeFieldBegin('ticketCategory', TType.I32, 12)
      oprot.writeI32(self.ticketCategory)
      oprot.writeFieldEnd()
    if self.ticketDescription is not None:
      oprot.writeFieldBegin('ticketDescription', TType.STRING, 13)
      oprot.writeString(self.ticketDescription)
      oprot.writeFieldEnd()
    if self.isRead is not None:
      oprot.writeFieldBegin('isRead', TType.BOOL, 14)
      oprot.writeBool(self.isRead)
      oprot.writeFieldEnd()
    if self.customerMobileNumber is not None:
      oprot.writeFieldBegin('customerMobileNumber', TType.STRING, 15)
      oprot.writeString(self.customerMobileNumber)
      oprot.writeFieldEnd()
    if self.customerEmailId is not None:
      oprot.writeFieldBegin('customerEmailId', TType.STRING, 16)
      oprot.writeString(self.customerEmailId)
      oprot.writeFieldEnd()
    if self.customerName is not None:
      oprot.writeFieldBegin('customerName', TType.STRING, 17)
      oprot.writeString(self.customerName)
      oprot.writeFieldEnd()
    if self.attachments is not None:
      oprot.writeFieldBegin('attachments', TType.STRING, 18)
      oprot.writeString(self.attachments)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class SearchFilter:
  """
  Attributes:
   - ticketId
   - activityId
   - ticketAssigneeIds
   - activityCreatorIds
   - agentId
   - customerId
   - startTimestamp
   - endTimestamp
   - isActivityRead
   - agentEmailId
   - customerEmailId
   - customerMobileNumber
   - ticketStatuses
   - ticketCategory
   - ticketPriority
   - activityType
   - ticketCategoryList
   - notShowPmTickets
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'ticketId', None, None, ), # 1
    (2, TType.I64, 'activityId', None, None, ), # 2
    (3, TType.LIST, 'ticketAssigneeIds', (TType.I64,None), None, ), # 3
    (4, TType.LIST, 'activityCreatorIds', (TType.I64,None), None, ), # 4
    (5, TType.I64, 'agentId', None, None, ), # 5
    (6, TType.I64, 'customerId', None, None, ), # 6
    (7, TType.I64, 'startTimestamp', None, None, ), # 7
    (8, TType.I64, 'endTimestamp', None, None, ), # 8
    (9, TType.BOOL, 'isActivityRead', None, None, ), # 9
    (10, TType.STRING, 'agentEmailId', None, None, ), # 10
    (11, TType.STRING, 'customerEmailId', None, None, ), # 11
    (12, TType.STRING, 'customerMobileNumber', None, None, ), # 12
    (13, TType.LIST, 'ticketStatuses', (TType.I32,None), None, ), # 13
    (14, TType.I32, 'ticketCategory', None, None, ), # 14
    (15, TType.I32, 'ticketPriority', None, None, ), # 15
    (16, TType.I32, 'activityType', None, None, ), # 16
    (17, TType.LIST, 'ticketCategoryList', (TType.I32,None), None, ), # 17
    (18, TType.BOOL, 'notShowPmTickets', None, None, ), # 18
  )

  def __init__(self, ticketId=None, activityId=None, ticketAssigneeIds=None, activityCreatorIds=None, agentId=None, customerId=None, startTimestamp=None, endTimestamp=None, isActivityRead=None, agentEmailId=None, customerEmailId=None, customerMobileNumber=None, ticketStatuses=None, ticketCategory=None, ticketPriority=None, activityType=None, ticketCategoryList=None, notShowPmTickets=None,):
    self.ticketId = ticketId
    self.activityId = activityId
    self.ticketAssigneeIds = ticketAssigneeIds
    self.activityCreatorIds = activityCreatorIds
    self.agentId = agentId
    self.customerId = customerId
    self.startTimestamp = startTimestamp
    self.endTimestamp = endTimestamp
    self.isActivityRead = isActivityRead
    self.agentEmailId = agentEmailId
    self.customerEmailId = customerEmailId
    self.customerMobileNumber = customerMobileNumber
    self.ticketStatuses = ticketStatuses
    self.ticketCategory = ticketCategory
    self.ticketPriority = ticketPriority
    self.activityType = activityType
    self.ticketCategoryList = ticketCategoryList
    self.notShowPmTickets = notShowPmTickets

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.ticketId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.activityId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.ticketAssigneeIds = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = iprot.readI64();
            self.ticketAssigneeIds.append(_elem5)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.activityCreatorIds = []
          (_etype9, _size6) = iprot.readListBegin()
          for _i10 in xrange(_size6):
            _elem11 = iprot.readI64();
            self.activityCreatorIds.append(_elem11)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.agentId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.customerId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.startTimestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.endTimestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.BOOL:
          self.isActivityRead = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.agentEmailId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.STRING:
          self.customerEmailId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.customerMobileNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.LIST:
          self.ticketStatuses = []
          (_etype15, _size12) = iprot.readListBegin()
          for _i16 in xrange(_size12):
            _elem17 = iprot.readI32();
            self.ticketStatuses.append(_elem17)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I32:
          self.ticketCategory = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I32:
          self.ticketPriority = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I32:
          self.activityType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.LIST:
          self.ticketCategoryList = []
          (_etype21, _size18) = iprot.readListBegin()
          for _i22 in xrange(_size18):
            _elem23 = iprot.readI32();
            self.ticketCategoryList.append(_elem23)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.BOOL:
          self.notShowPmTickets = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('SearchFilter')
    if self.ticketId is not None:
      oprot.writeFieldBegin('ticketId', TType.I64, 1)
      oprot.writeI64(self.ticketId)
      oprot.writeFieldEnd()
    if self.activityId is not None:
      oprot.writeFieldBegin('activityId', TType.I64, 2)
      oprot.writeI64(self.activityId)
      oprot.writeFieldEnd()
    if self.ticketAssigneeIds is not None:
      oprot.writeFieldBegin('ticketAssigneeIds', TType.LIST, 3)
      oprot.writeListBegin(TType.I64, len(self.ticketAssigneeIds))
      for iter24 in self.ticketAssigneeIds:
        oprot.writeI64(iter24)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.activityCreatorIds is not None:
      oprot.writeFieldBegin('activityCreatorIds', TType.LIST, 4)
      oprot.writeListBegin(TType.I64, len(self.activityCreatorIds))
      for iter25 in self.activityCreatorIds:
        oprot.writeI64(iter25)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.agentId is not None:
      oprot.writeFieldBegin('agentId', TType.I64, 5)
      oprot.writeI64(self.agentId)
      oprot.writeFieldEnd()
    if self.customerId is not None:
      oprot.writeFieldBegin('customerId', TType.I64, 6)
      oprot.writeI64(self.customerId)
      oprot.writeFieldEnd()
    if self.startTimestamp is not None:
      oprot.writeFieldBegin('startTimestamp', TType.I64, 7)
      oprot.writeI64(self.startTimestamp)
      oprot.writeFieldEnd()
    if self.endTimestamp is not None:
      oprot.writeFieldBegin('endTimestamp', TType.I64, 8)
      oprot.writeI64(self.endTimestamp)
      oprot.writeFieldEnd()
    if self.isActivityRead is not None:
      oprot.writeFieldBegin('isActivityRead', TType.BOOL, 9)
      oprot.writeBool(self.isActivityRead)
      oprot.writeFieldEnd()
    if self.agentEmailId is not None:
      oprot.writeFieldBegin('agentEmailId', TType.STRING, 10)
      oprot.writeString(self.agentEmailId)
      oprot.writeFieldEnd()
    if self.customerEmailId is not None:
      oprot.writeFieldBegin('customerEmailId', TType.STRING, 11)
      oprot.writeString(self.customerEmailId)
      oprot.writeFieldEnd()
    if self.customerMobileNumber is not None:
      oprot.writeFieldBegin('customerMobileNumber', TType.STRING, 12)
      oprot.writeString(self.customerMobileNumber)
      oprot.writeFieldEnd()
    if self.ticketStatuses is not None:
      oprot.writeFieldBegin('ticketStatuses', TType.LIST, 13)
      oprot.writeListBegin(TType.I32, len(self.ticketStatuses))
      for iter26 in self.ticketStatuses:
        oprot.writeI32(iter26)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ticketCategory is not None:
      oprot.writeFieldBegin('ticketCategory', TType.I32, 14)
      oprot.writeI32(self.ticketCategory)
      oprot.writeFieldEnd()
    if self.ticketPriority is not None:
      oprot.writeFieldBegin('ticketPriority', TType.I32, 15)
      oprot.writeI32(self.ticketPriority)
      oprot.writeFieldEnd()
    if self.activityType is not None:
      oprot.writeFieldBegin('activityType', TType.I32, 16)
      oprot.writeI32(self.activityType)
      oprot.writeFieldEnd()
    if self.ticketCategoryList is not None:
      oprot.writeFieldBegin('ticketCategoryList', TType.LIST, 17)
      oprot.writeListBegin(TType.I32, len(self.ticketCategoryList))
      for iter27 in self.ticketCategoryList:
        oprot.writeI32(iter27)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.notShowPmTickets is not None:
      oprot.writeFieldBegin('notShowPmTickets', TType.BOOL, 18)
      oprot.writeBool(self.notShowPmTickets)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class CRMServiceException(Exception):
  """
  Attributes:
   - exceptionType
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'exceptionType', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, exceptionType=None, message=None,):
    self.exceptionType = exceptionType
    self.message = message

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.exceptionType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('CRMServiceException')
    if self.exceptionType is not None:
      oprot.writeFieldBegin('exceptionType', TType.I32, 1)
      oprot.writeI32(self.exceptionType)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)