#
# Autogenerated by Thrift Compiler (0.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec

import sys

from thrift.transport import TTransport
all_structs = []


class ErrorCode(object):
    """
    Standard error codes for service exceptions.

    """
    UNKNOWN = 0
    NOT_IMPLEMENTED = 1
    INTERNAL_ERROR = 2
    INVALID_REQUEST = 3
    PROXY_UNAVAILABLE = 4
    ACCOUNT_UNAVAILABLE = 5
    BOT_DETECTED = 6
    BOT_DETECTION_SIGN_IN_REQUIRED = 7
    SABR_STREAMING_DETECTED = 8

    _VALUES_TO_NAMES = {
        0: "UNKNOWN",
        1: "NOT_IMPLEMENTED",
        2: "INTERNAL_ERROR",
        3: "INVALID_REQUEST",
        4: "PROXY_UNAVAILABLE",
        5: "ACCOUNT_UNAVAILABLE",
        6: "BOT_DETECTED",
        7: "BOT_DETECTION_SIGN_IN_REQUIRED",
        8: "SABR_STREAMING_DETECTED",
    }

    _NAMES_TO_VALUES = {
        "UNKNOWN": 0,
        "NOT_IMPLEMENTED": 1,
        "INTERNAL_ERROR": 2,
        "INVALID_REQUEST": 3,
        "PROXY_UNAVAILABLE": 4,
        "ACCOUNT_UNAVAILABLE": 5,
        "BOT_DETECTED": 6,
        "BOT_DETECTION_SIGN_IN_REQUIRED": 7,
        "SABR_STREAMING_DETECTED": 8,
    }


class JobState(object):
    SUCCESS = 0
    FAIL = 1
    BOT_FORBIDDEN_ON_URL_ACCESS = 2
    BOT_FORBIDDEN_ON_FILE_DOWNLOAD = 3
    BOT_CAPTCHA = 4
    BOT_AUTH_RELOGIN_REQUIRED = 5
    BOT_AUTH_SMS_REQUIRED = 6
    BOT_AUTH_DEVICE_QR_REQUIRED = 7
    BOT_ACCOUNT_BANNED = 8
    BOT_IP_BANNED = 9

    _VALUES_TO_NAMES = {
        0: "SUCCESS",
        1: "FAIL",
        2: "BOT_FORBIDDEN_ON_URL_ACCESS",
        3: "BOT_FORBIDDEN_ON_FILE_DOWNLOAD",
        4: "BOT_CAPTCHA",
        5: "BOT_AUTH_RELOGIN_REQUIRED",
        6: "BOT_AUTH_SMS_REQUIRED",
        7: "BOT_AUTH_DEVICE_QR_REQUIRED",
        8: "BOT_ACCOUNT_BANNED",
        9: "BOT_IP_BANNED",
    }

    _NAMES_TO_VALUES = {
        "SUCCESS": 0,
        "FAIL": 1,
        "BOT_FORBIDDEN_ON_URL_ACCESS": 2,
        "BOT_FORBIDDEN_ON_FILE_DOWNLOAD": 3,
        "BOT_CAPTCHA": 4,
        "BOT_AUTH_RELOGIN_REQUIRED": 5,
        "BOT_AUTH_SMS_REQUIRED": 6,
        "BOT_AUTH_DEVICE_QR_REQUIRED": 7,
        "BOT_ACCOUNT_BANNED": 8,
        "BOT_IP_BANNED": 9,
    }


class TokenUpdateMode(object):
    AUTOREFRESH_AND_REMAIN_ANONYMOUS = 0
    AUTOREFRESH_AND_ALLOW_AUTH = 1
    AUTOREFRESH_AND_ONLY_AUTH = 2
    CLEANUP_THEN_AUTOREFRESH_AND_ONLY_AUTH = 3
    CLEANUP_THEN_AUTOREFRESH_AND_REMAIN_ANONYMOUS = 4
    CLEANUP_THEN_AUTOREFRESH_AND_ALLOW_AUTH = 5
    AUTO = 6

    _VALUES_TO_NAMES = {
        0: "AUTOREFRESH_AND_REMAIN_ANONYMOUS",
        1: "AUTOREFRESH_AND_ALLOW_AUTH",
        2: "AUTOREFRESH_AND_ONLY_AUTH",
        3: "CLEANUP_THEN_AUTOREFRESH_AND_ONLY_AUTH",
        4: "CLEANUP_THEN_AUTOREFRESH_AND_REMAIN_ANONYMOUS",
        5: "CLEANUP_THEN_AUTOREFRESH_AND_ALLOW_AUTH",
        6: "AUTO",
    }

    _NAMES_TO_VALUES = {
        "AUTOREFRESH_AND_REMAIN_ANONYMOUS": 0,
        "AUTOREFRESH_AND_ALLOW_AUTH": 1,
        "AUTOREFRESH_AND_ONLY_AUTH": 2,
        "CLEANUP_THEN_AUTOREFRESH_AND_ONLY_AUTH": 3,
        "CLEANUP_THEN_AUTOREFRESH_AND_REMAIN_ANONYMOUS": 4,
        "CLEANUP_THEN_AUTOREFRESH_AND_ALLOW_AUTH": 5,
        "AUTO": 6,
    }


class AccountPairState(object):
    ACTIVE = 0
    PAUSED = 1
    REMOVED = 2
    IN_PROGRESS = 3
    ALL = 4

    _VALUES_TO_NAMES = {
        0: "ACTIVE",
        1: "PAUSED",
        2: "REMOVED",
        3: "IN_PROGRESS",
        4: "ALL",
    }

    _NAMES_TO_VALUES = {
        "ACTIVE": 0,
        "PAUSED": 1,
        "REMOVED": 2,
        "IN_PROGRESS": 3,
        "ALL": 4,
    }


class JobTokenData(object):
    """
    Attributes:
     - infoJson
     - ytdlpCommand
     - socks
     - jobId
     - url
     - cookiesBlob
     - requestSummary
     - communicationLogPaths
     - serverVersionInfo

    """


    def __init__(self, infoJson=None, ytdlpCommand=None, socks=None, jobId=None, url=None, cookiesBlob=None, requestSummary=None, communicationLogPaths=None, serverVersionInfo=None,):
        self.infoJson = infoJson
        self.ytdlpCommand = ytdlpCommand
        self.socks = socks
        self.jobId = jobId
        self.url = url
        self.cookiesBlob = cookiesBlob
        self.requestSummary = requestSummary
        self.communicationLogPaths = communicationLogPaths
        self.serverVersionInfo = serverVersionInfo

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.infoJson = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.ytdlpCommand = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.socks = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.jobId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.cookiesBlob = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.requestSummary = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.LIST:
                    self.communicationLogPaths = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.communicationLogPaths.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.STRING:
                    self.serverVersionInfo = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('JobTokenData')
        if self.infoJson is not None:
            oprot.writeFieldBegin('infoJson', TType.STRING, 1)
            oprot.writeString(self.infoJson.encode('utf-8') if sys.version_info[0] == 2 else self.infoJson)
            oprot.writeFieldEnd()
        if self.ytdlpCommand is not None:
            oprot.writeFieldBegin('ytdlpCommand', TType.STRING, 2)
            oprot.writeString(self.ytdlpCommand.encode('utf-8') if sys.version_info[0] == 2 else self.ytdlpCommand)
            oprot.writeFieldEnd()
        if self.socks is not None:
            oprot.writeFieldBegin('socks', TType.STRING, 3)
            oprot.writeString(self.socks.encode('utf-8') if sys.version_info[0] == 2 else self.socks)
            oprot.writeFieldEnd()
        if self.jobId is not None:
            oprot.writeFieldBegin('jobId', TType.STRING, 4)
            oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId)
            oprot.writeFieldEnd()
        if self.url is not None:
            oprot.writeFieldBegin('url', TType.STRING, 5)
            oprot.writeString(self.url.encode('utf-8') if sys.version_info[0] == 2 else self.url)
            oprot.writeFieldEnd()
        if self.cookiesBlob is not None:
            oprot.writeFieldBegin('cookiesBlob', TType.STRING, 6)
            oprot.writeString(self.cookiesBlob.encode('utf-8') if sys.version_info[0] == 2 else self.cookiesBlob)
            oprot.writeFieldEnd()
        if self.requestSummary is not None:
            oprot.writeFieldBegin('requestSummary', TType.STRING, 7)
            oprot.writeString(self.requestSummary.encode('utf-8') if sys.version_info[0] == 2 else self.requestSummary)
            oprot.writeFieldEnd()
        if self.communicationLogPaths is not None:
            oprot.writeFieldBegin('communicationLogPaths', TType.LIST, 8)
            oprot.writeListBegin(TType.STRING, len(self.communicationLogPaths))
            for iter6 in self.communicationLogPaths:
                oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.serverVersionInfo is not None:
            oprot.writeFieldBegin('serverVersionInfo', TType.STRING, 9)
            oprot.writeString(self.serverVersionInfo.encode('utf-8') if sys.version_info[0] == 2 else self.serverVersionInfo)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AccountData(object):
    """
    Attributes:
     - username
     - password
     - countryCode

    """


    def __init__(self, username=None, password=None, countryCode=None,):
        self.username = username
        self.password = password
        self.countryCode = countryCode

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.password = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.countryCode = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AccountData')
        if self.username is not None:
            oprot.writeFieldBegin('username', TType.STRING, 1)
            oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username)
            oprot.writeFieldEnd()
        if self.password is not None:
            oprot.writeFieldBegin('password', TType.STRING, 2)
            oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password)
            oprot.writeFieldEnd()
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 3)
            oprot.writeString(self.countryCode.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.username is None:
            raise TProtocolException(message='Required field username is unset!')
        if self.password is None:
            raise TProtocolException(message='Required field password is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ProxyData(object):
    """
    Attributes:
     - proxyUrl
     - countryCode

    """


    def __init__(self, proxyUrl=None, countryCode=None,):
        self.proxyUrl = proxyUrl
        self.countryCode = countryCode

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.proxyUrl = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.countryCode = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ProxyData')
        if self.proxyUrl is not None:
            oprot.writeFieldBegin('proxyUrl', TType.STRING, 1)
            oprot.writeString(self.proxyUrl.encode('utf-8') if sys.version_info[0] == 2 else self.proxyUrl)
            oprot.writeFieldEnd()
        if self.countryCode is not None:
            oprot.writeFieldBegin('countryCode', TType.STRING, 2)
            oprot.writeString(self.countryCode.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.proxyUrl is None:
            raise TProtocolException(message='Required field proxyUrl is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AccountPairWithState(object):
    """
    Attributes:
     - accountId
     - proxyId
     - accountPairState
     - machineId

    """


    def __init__(self, accountId=None, proxyId=None, accountPairState=None, machineId=None,):
        self.accountId = accountId
        self.proxyId = proxyId
        self.accountPairState = accountPairState
        self.machineId = machineId

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.proxyId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.accountPairState = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.machineId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AccountPairWithState')
        if self.accountId is not None:
            oprot.writeFieldBegin('accountId', TType.STRING, 1)
            oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId)
            oprot.writeFieldEnd()
        if self.proxyId is not None:
            oprot.writeFieldBegin('proxyId', TType.STRING, 2)
            oprot.writeString(self.proxyId.encode('utf-8') if sys.version_info[0] == 2 else self.proxyId)
            oprot.writeFieldEnd()
        if self.accountPairState is not None:
            oprot.writeFieldBegin('accountPairState', TType.I32, 3)
            oprot.writeI32(self.accountPairState)
            oprot.writeFieldEnd()
        if self.machineId is not None:
            oprot.writeFieldBegin('machineId', TType.STRING, 4)
            oprot.writeString(self.machineId.encode('utf-8') if sys.version_info[0] == 2 else self.machineId)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.accountId is None:
            raise TProtocolException(message='Required field accountId is unset!')
        if self.proxyId is None:
            raise TProtocolException(message='Required field proxyId is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 JobData(object):
    """
    Attributes:
     - jobId
     - url
     - cookiesBlob
     - potoken
     - visitorId
     - ytdlpCommand
     - createdTime
     - telemetry
     - state
     - errorMessage
     - socks5Id

    """


    def __init__(self, jobId=None, url=None, cookiesBlob=None, potoken=None, visitorId=None, ytdlpCommand=None, createdTime=None, telemetry=None, state=None, errorMessage=None, socks5Id=None,):
        self.jobId = jobId
        self.url = url
        self.cookiesBlob = cookiesBlob
        self.potoken = potoken
        self.visitorId = visitorId
        self.ytdlpCommand = ytdlpCommand
        self.createdTime = createdTime
        self.telemetry = telemetry
        self.state = state
        self.errorMessage = errorMessage
        self.socks5Id = socks5Id

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.jobId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.url = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.cookiesBlob = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.potoken = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.visitorId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.ytdlpCommand = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.createdTime = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.MAP:
                    self.telemetry = {}
                    (_ktype8, _vtype9, _size7) = iprot.readMapBegin()
                    for _i11 in range(_size7):
                        _key12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        _val13 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                        self.telemetry[_key12] = _val13
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 9:
                if ftype == TType.I32:
                    self.state = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 10:
                if ftype == TType.STRING:
                    self.errorMessage = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 11:
                if ftype == TType.STRING:
                    self.socks5Id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('JobData')
        if self.jobId is not None:
            oprot.writeFieldBegin('jobId', TType.STRING, 1)
            oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId)
            oprot.writeFieldEnd()
        if self.url is not None:
            oprot.writeFieldBegin('url', TType.STRING, 2)
            oprot.writeString(self.url.encode('utf-8') if sys.version_info[0] == 2 else self.url)
            oprot.writeFieldEnd()
        if self.cookiesBlob is not None:
            oprot.writeFieldBegin('cookiesBlob', TType.STRING, 3)
            oprot.writeString(self.cookiesBlob.encode('utf-8') if sys.version_info[0] == 2 else self.cookiesBlob)
            oprot.writeFieldEnd()
        if self.potoken is not None:
            oprot.writeFieldBegin('potoken', TType.STRING, 4)
            oprot.writeString(self.potoken.encode('utf-8') if sys.version_info[0] == 2 else self.potoken)
            oprot.writeFieldEnd()
        if self.visitorId is not None:
            oprot.writeFieldBegin('visitorId', TType.STRING, 5)
            oprot.writeString(self.visitorId.encode('utf-8') if sys.version_info[0] == 2 else self.visitorId)
            oprot.writeFieldEnd()
        if self.ytdlpCommand is not None:
            oprot.writeFieldBegin('ytdlpCommand', TType.STRING, 6)
            oprot.writeString(self.ytdlpCommand.encode('utf-8') if sys.version_info[0] == 2 else self.ytdlpCommand)
            oprot.writeFieldEnd()
        if self.createdTime is not None:
            oprot.writeFieldBegin('createdTime', TType.STRING, 7)
            oprot.writeString(self.createdTime.encode('utf-8') if sys.version_info[0] == 2 else self.createdTime)
            oprot.writeFieldEnd()
        if self.telemetry is not None:
            oprot.writeFieldBegin('telemetry', TType.MAP, 8)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.telemetry))
            for kiter14, viter15 in self.telemetry.items():
                oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14)
                oprot.writeString(viter15.encode('utf-8') if sys.version_info[0] == 2 else viter15)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.state is not None:
            oprot.writeFieldBegin('state', TType.I32, 9)
            oprot.writeI32(self.state)
            oprot.writeFieldEnd()
        if self.errorMessage is not None:
            oprot.writeFieldBegin('errorMessage', TType.STRING, 10)
            oprot.writeString(self.errorMessage.encode('utf-8') if sys.version_info[0] == 2 else self.errorMessage)
            oprot.writeFieldEnd()
        if self.socks5Id is not None:
            oprot.writeFieldBegin('socks5Id', TType.STRING, 11)
            oprot.writeString(self.socks5Id.encode('utf-8') if sys.version_info[0] == 2 else self.socks5Id)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.jobId is None:
            raise TProtocolException(message='Required field jobId is unset!')
        if self.url is None:
            raise TProtocolException(message='Required field url is unset!')
        if self.cookiesBlob is None:
            raise TProtocolException(message='Required field cookiesBlob is unset!')
        if self.potoken is None:
            raise TProtocolException(message='Required field potoken is unset!')
        if self.visitorId is None:
            raise TProtocolException(message='Required field visitorId is unset!')
        if self.ytdlpCommand is None:
            raise TProtocolException(message='Required field ytdlpCommand is unset!')
        if self.createdTime is None:
            raise TProtocolException(message='Required field createdTime is unset!')
        if self.telemetry is None:
            raise TProtocolException(message='Required field telemetry is unset!')
        if self.state is None:
            raise TProtocolException(message='Required field state is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 RichCollectionPagination(object):
    """
    Attributes:
     - hasNext
     - totalCount
     - page
     - pageSize

    """


    def __init__(self, hasNext=None, totalCount=None, page=None, pageSize=None,):
        self.hasNext = hasNext
        self.totalCount = totalCount
        self.page = page
        self.pageSize = pageSize

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.BOOL:
                    self.hasNext = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I32:
                    self.totalCount = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I32:
                    self.page = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I32:
                    self.pageSize = iprot.readI32()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('RichCollectionPagination')
        if self.hasNext is not None:
            oprot.writeFieldBegin('hasNext', TType.BOOL, 1)
            oprot.writeBool(self.hasNext)
            oprot.writeFieldEnd()
        if self.totalCount is not None:
            oprot.writeFieldBegin('totalCount', TType.I32, 2)
            oprot.writeI32(self.totalCount)
            oprot.writeFieldEnd()
        if self.page is not None:
            oprot.writeFieldBegin('page', TType.I32, 3)
            oprot.writeI32(self.page)
            oprot.writeFieldEnd()
        if self.pageSize is not None:
            oprot.writeFieldBegin('pageSize', TType.I32, 4)
            oprot.writeI32(self.pageSize)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.hasNext is None:
            raise TProtocolException(message='Required field hasNext is unset!')
        if self.totalCount is None:
            raise TProtocolException(message='Required field totalCount is unset!')
        if self.page is None:
            raise TProtocolException(message='Required field page is unset!')
        if self.pageSize is None:
            raise TProtocolException(message='Required field pageSize is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 RichCollectionJobData(object):
    """
    Attributes:
     - items
     - pagination

    """


    def __init__(self, items=None, pagination=None,):
        self.items = items
        self.pagination = pagination

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.LIST:
                    self.items = []
                    (_etype19, _size16) = iprot.readListBegin()
                    for _i20 in range(_size16):
                        _elem21 = JobData()
                        _elem21.read(iprot)
                        self.items.append(_elem21)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.pagination = RichCollectionPagination()
                    self.pagination.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('RichCollectionJobData')
        if self.items is not None:
            oprot.writeFieldBegin('items', TType.LIST, 1)
            oprot.writeListBegin(TType.STRUCT, len(self.items))
            for iter22 in self.items:
                iter22.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.pagination is not None:
            oprot.writeFieldBegin('pagination', TType.STRUCT, 2)
            self.pagination.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        if self.items is None:
            raise TProtocolException(message='Required field items is unset!')
        if self.pagination is None:
            raise TProtocolException(message='Required field pagination is unset!')
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 ProxyStatus(object):
    """
    Attributes:
     - proxyUrl
     - status
     - successCount
     - failureCount
     - lastFailureTimestamp
     - lastSuccessTimestamp
     - serverIdentity

    """


    def __init__(self, proxyUrl=None, status=None, successCount=None, failureCount=None, lastFailureTimestamp=None, lastSuccessTimestamp=None, serverIdentity=None,):
        self.proxyUrl = proxyUrl
        self.status = status
        self.successCount = successCount
        self.failureCount = failureCount
        self.lastFailureTimestamp = lastFailureTimestamp
        self.lastSuccessTimestamp = lastSuccessTimestamp
        self.serverIdentity = serverIdentity

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.proxyUrl = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.failureCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.lastFailureTimestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.lastSuccessTimestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.serverIdentity = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('ProxyStatus')
        if self.proxyUrl is not None:
            oprot.writeFieldBegin('proxyUrl', TType.STRING, 1)
            oprot.writeString(self.proxyUrl.encode('utf-8') if sys.version_info[0] == 2 else self.proxyUrl)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.STRING, 2)
            oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status)
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 3)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failureCount is not None:
            oprot.writeFieldBegin('failureCount', TType.I64, 4)
            oprot.writeI64(self.failureCount)
            oprot.writeFieldEnd()
        if self.lastFailureTimestamp is not None:
            oprot.writeFieldBegin('lastFailureTimestamp', TType.STRING, 5)
            oprot.writeString(self.lastFailureTimestamp.encode('utf-8') if sys.version_info[0] == 2 else self.lastFailureTimestamp)
            oprot.writeFieldEnd()
        if self.lastSuccessTimestamp is not None:
            oprot.writeFieldBegin('lastSuccessTimestamp', TType.STRING, 6)
            oprot.writeString(self.lastSuccessTimestamp.encode('utf-8') if sys.version_info[0] == 2 else self.lastSuccessTimestamp)
            oprot.writeFieldEnd()
        if self.serverIdentity is not None:
            oprot.writeFieldBegin('serverIdentity', TType.STRING, 7)
            oprot.writeString(self.serverIdentity.encode('utf-8') if sys.version_info[0] == 2 else self.serverIdentity)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AccountStatus(object):
    """
    Attributes:
     - accountId
     - status
     - successCount
     - failureCount
     - lastFailureTimestamp
     - lastSuccessTimestamp
     - lastUsedProxy
     - lastUsedMachine

    """


    def __init__(self, accountId=None, status=None, successCount=None, failureCount=None, lastFailureTimestamp=None, lastSuccessTimestamp=None, lastUsedProxy=None, lastUsedMachine=None,):
        self.accountId = accountId
        self.status = status
        self.successCount = successCount
        self.failureCount = failureCount
        self.lastFailureTimestamp = lastFailureTimestamp
        self.lastSuccessTimestamp = lastSuccessTimestamp
        self.lastUsedProxy = lastUsedProxy
        self.lastUsedMachine = lastUsedMachine

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.accountId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.successCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.I64:
                    self.failureCount = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.STRING:
                    self.lastFailureTimestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.lastSuccessTimestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.lastUsedProxy = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 8:
                if ftype == TType.STRING:
                    self.lastUsedMachine = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AccountStatus')
        if self.accountId is not None:
            oprot.writeFieldBegin('accountId', TType.STRING, 1)
            oprot.writeString(self.accountId.encode('utf-8') if sys.version_info[0] == 2 else self.accountId)
            oprot.writeFieldEnd()
        if self.status is not None:
            oprot.writeFieldBegin('status', TType.STRING, 2)
            oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status)
            oprot.writeFieldEnd()
        if self.successCount is not None:
            oprot.writeFieldBegin('successCount', TType.I64, 3)
            oprot.writeI64(self.successCount)
            oprot.writeFieldEnd()
        if self.failureCount is not None:
            oprot.writeFieldBegin('failureCount', TType.I64, 4)
            oprot.writeI64(self.failureCount)
            oprot.writeFieldEnd()
        if self.lastFailureTimestamp is not None:
            oprot.writeFieldBegin('lastFailureTimestamp', TType.STRING, 5)
            oprot.writeString(self.lastFailureTimestamp.encode('utf-8') if sys.version_info[0] == 2 else self.lastFailureTimestamp)
            oprot.writeFieldEnd()
        if self.lastSuccessTimestamp is not None:
            oprot.writeFieldBegin('lastSuccessTimestamp', TType.STRING, 6)
            oprot.writeString(self.lastSuccessTimestamp.encode('utf-8') if sys.version_info[0] == 2 else self.lastSuccessTimestamp)
            oprot.writeFieldEnd()
        if self.lastUsedProxy is not None:
            oprot.writeFieldBegin('lastUsedProxy', TType.STRING, 7)
            oprot.writeString(self.lastUsedProxy.encode('utf-8') if sys.version_info[0] == 2 else self.lastUsedProxy)
            oprot.writeFieldEnd()
        if self.lastUsedMachine is not None:
            oprot.writeFieldBegin('lastUsedMachine', TType.STRING, 8)
            oprot.writeString(self.lastUsedMachine.encode('utf-8') if sys.version_info[0] == 2 else self.lastUsedMachine)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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 AirflowLogContext(object):
    """
    Attributes:
     - logS3Path
     - dagId
     - runId
     - taskId
     - tryNumber
     - workerHostname
     - queue

    """


    def __init__(self, logS3Path=None, dagId=None, runId=None, taskId=None, tryNumber=None, workerHostname=None, queue=None,):
        self.logS3Path = logS3Path
        self.dagId = dagId
        self.runId = runId
        self.taskId = taskId
        self.tryNumber = tryNumber
        self.workerHostname = workerHostname
        self.queue = queue

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [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.STRING:
                    self.logS3Path = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.dagId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.runId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.taskId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 5:
                if ftype == TType.I32:
                    self.tryNumber = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 6:
                if ftype == TType.STRING:
                    self.workerHostname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 7:
                if ftype == TType.STRING:
                    self.queue = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('AirflowLogContext')
        if self.logS3Path is not None:
            oprot.writeFieldBegin('logS3Path', TType.STRING, 1)
            oprot.writeString(self.logS3Path.encode('utf-8') if sys.version_info[0] == 2 else self.logS3Path)
            oprot.writeFieldEnd()
        if self.dagId is not None:
            oprot.writeFieldBegin('dagId', TType.STRING, 2)
            oprot.writeString(self.dagId.encode('utf-8') if sys.version_info[0] == 2 else self.dagId)
            oprot.writeFieldEnd()
        if self.runId is not None:
            oprot.writeFieldBegin('runId', TType.STRING, 3)
            oprot.writeString(self.runId.encode('utf-8') if sys.version_info[0] == 2 else self.runId)
            oprot.writeFieldEnd()
        if self.taskId is not None:
            oprot.writeFieldBegin('taskId', TType.STRING, 4)
            oprot.writeString(self.taskId.encode('utf-8') if sys.version_info[0] == 2 else self.taskId)
            oprot.writeFieldEnd()
        if self.tryNumber is not None:
            oprot.writeFieldBegin('tryNumber', TType.I32, 5)
            oprot.writeI32(self.tryNumber)
            oprot.writeFieldEnd()
        if self.workerHostname is not None:
            oprot.writeFieldBegin('workerHostname', TType.STRING, 6)
            oprot.writeString(self.workerHostname.encode('utf-8') if sys.version_info[0] == 2 else self.workerHostname)
            oprot.writeFieldEnd()
        if self.queue is not None:
            oprot.writeFieldBegin('queue', TType.STRING, 7)
            oprot.writeString(self.queue.encode('utf-8') if sys.version_info[0] == 2 else self.queue)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        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)
all_structs.append(JobTokenData)
JobTokenData.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'infoJson', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'ytdlpCommand', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'socks', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'jobId', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'url', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'cookiesBlob', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'requestSummary', 'UTF8', None, ),  # 7
    (8, TType.LIST, 'communicationLogPaths', (TType.STRING, 'UTF8', False), None, ),  # 8
    (9, TType.STRING, 'serverVersionInfo', 'UTF8', None, ),  # 9
)
all_structs.append(AccountData)
AccountData.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'username', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'password', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'countryCode', 'UTF8', None, ),  # 3
)
all_structs.append(ProxyData)
ProxyData.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'proxyUrl', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'countryCode', 'UTF8', None, ),  # 2
)
all_structs.append(AccountPairWithState)
AccountPairWithState.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'accountId', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'proxyId', 'UTF8', None, ),  # 2
    (3, TType.I32, 'accountPairState', None, None, ),  # 3
    (4, TType.STRING, 'machineId', 'UTF8', None, ),  # 4
)
all_structs.append(JobData)
JobData.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'jobId', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'url', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'cookiesBlob', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'potoken', 'UTF8', None, ),  # 4
    (5, TType.STRING, 'visitorId', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'ytdlpCommand', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'createdTime', 'UTF8', None, ),  # 7
    (8, TType.MAP, 'telemetry', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 8
    (9, TType.I32, 'state', None, None, ),  # 9
    (10, TType.STRING, 'errorMessage', 'UTF8', None, ),  # 10
    (11, TType.STRING, 'socks5Id', 'UTF8', None, ),  # 11
)
all_structs.append(RichCollectionPagination)
RichCollectionPagination.thrift_spec = (
    None,  # 0
    (1, TType.BOOL, 'hasNext', None, None, ),  # 1
    (2, TType.I32, 'totalCount', None, None, ),  # 2
    (3, TType.I32, 'page', None, None, ),  # 3
    (4, TType.I32, 'pageSize', None, None, ),  # 4
)
all_structs.append(RichCollectionJobData)
RichCollectionJobData.thrift_spec = (
    None,  # 0
    (1, TType.LIST, 'items', (TType.STRUCT, [JobData, None], False), None, ),  # 1
    (2, TType.STRUCT, 'pagination', [RichCollectionPagination, None], None, ),  # 2
)
all_structs.append(ProxyStatus)
ProxyStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'proxyUrl', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'status', 'UTF8', None, ),  # 2
    (3, TType.I64, 'successCount', None, None, ),  # 3
    (4, TType.I64, 'failureCount', None, None, ),  # 4
    (5, TType.STRING, 'lastFailureTimestamp', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'lastSuccessTimestamp', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'serverIdentity', 'UTF8', None, ),  # 7
)
all_structs.append(AccountStatus)
AccountStatus.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'accountId', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'status', 'UTF8', None, ),  # 2
    (3, TType.I64, 'successCount', None, None, ),  # 3
    (4, TType.I64, 'failureCount', None, None, ),  # 4
    (5, TType.STRING, 'lastFailureTimestamp', 'UTF8', None, ),  # 5
    (6, TType.STRING, 'lastSuccessTimestamp', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'lastUsedProxy', 'UTF8', None, ),  # 7
    (8, TType.STRING, 'lastUsedMachine', 'UTF8', None, ),  # 8
)
all_structs.append(AirflowLogContext)
AirflowLogContext.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'logS3Path', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'dagId', 'UTF8', None, ),  # 2
    (3, TType.STRING, 'runId', 'UTF8', None, ),  # 3
    (4, TType.STRING, 'taskId', 'UTF8', None, ),  # 4
    (5, TType.I32, 'tryNumber', None, None, ),  # 5
    (6, TType.STRING, 'workerHostname', 'UTF8', None, ),  # 6
    (7, TType.STRING, 'queue', 'UTF8', None, ),  # 7
)
fix_spec(all_structs)
del all_structs
