<s> from thrift . Thrift import TType , TMessageType , TException , TApplicationException <EOL> import evernote . edam . type . ttypes <EOL> import evernote . edam . error . ttypes <EOL> from thrift . transport import TTransport <EOL> from thrift . protocol import TBinaryProtocol , TProtocol <EOL> try : <EOL> from thrift . protocol import fastbinary <EOL> except : <EOL> fastbinary = None <EOL> class PublicUserInfo ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I32 , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . I32 , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT:username>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:6> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , userId = None , shardId = None , privilege = None , username = None , noteStoreUrl = None , webApiUrlPrefix = None , ) : <EOL> self . userId = userId <EOL> self . shardId = shardId <EOL> self . privilege = privilege <EOL> self . username = username <EOL> self . noteStoreUrl = noteStoreUrl <EOL> self . webApiUrlPrefix = webApiUrlPrefix <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I32 : <EOL> self . userId = iprot . readI32 ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . shardId = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . I32 : <EOL> self . privilege = iprot . readI32 ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . username = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . STRING : <EOL> self . noteStoreUrl = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . STRING : <EOL> self . webApiUrlPrefix = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . userId is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:1> ) <EOL> oprot . writeI32 ( self . userId ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . shardId is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . shardId ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . privilege is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I32 , <NUM_LIT:3> ) <EOL> oprot . writeI32 ( self . privilege ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . username is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:username>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . username ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . noteStoreUrl is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:5> ) <EOL> oprot . writeString ( self . noteStoreUrl ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . webApiUrlPrefix is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:6> ) <EOL> oprot . writeString ( self . webApiUrlPrefix ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . userId is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . shardId is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class AuthenticationResult ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . I64 , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . I64 , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRUCT , '<STR_LIT:user>' , ( evernote . edam . type . ttypes . User , evernote . edam . type . ttypes . User . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:5> , TType . STRUCT , '<STR_LIT>' , ( PublicUserInfo , PublicUserInfo . thrift_spec ) , None , ) , <EOL> ( <NUM_LIT:6> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:7> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:8> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:9> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , currentTime = None , authenticationToken = None , expiration = None , user = None , publicUserInfo = None , noteStoreUrl = None , webApiUrlPrefix = None , secondFactorRequired = None , secondFactorDeliveryHint = None , ) : <EOL> self . currentTime = currentTime <EOL> self . authenticationToken = authenticationToken <EOL> self . expiration = expiration <EOL> self . user = user <EOL> self . publicUserInfo = publicUserInfo <EOL> self . noteStoreUrl = noteStoreUrl <EOL> self . webApiUrlPrefix = webApiUrlPrefix <EOL> self . secondFactorRequired = secondFactorRequired <EOL> self . secondFactorDeliveryHint = secondFactorDeliveryHint <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . I64 : <EOL> self . currentTime = iprot . readI64 ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . authenticationToken = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . I64 : <EOL> self . expiration = iprot . readI64 ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRUCT : <EOL> self . user = evernote . edam . type . ttypes . User ( ) <EOL> self . user . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . STRUCT : <EOL> self . publicUserInfo = PublicUserInfo ( ) <EOL> self . publicUserInfo . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . STRING : <EOL> self . noteStoreUrl = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:7> : <EOL> if ftype == TType . STRING : <EOL> self . webApiUrlPrefix = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:8> : <EOL> if ftype == TType . BOOL : <EOL> self . secondFactorRequired = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:9> : <EOL> if ftype == TType . STRING : <EOL> self . secondFactorDeliveryHint = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . currentTime is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I64 , <NUM_LIT:1> ) <EOL> oprot . writeI64 ( self . currentTime ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . authenticationToken is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . authenticationToken ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . expiration is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . I64 , <NUM_LIT:3> ) <EOL> oprot . writeI64 ( self . expiration ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . user is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:user>' , TType . STRUCT , <NUM_LIT:4> ) <EOL> self . user . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . publicUserInfo is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:5> ) <EOL> self . publicUserInfo . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . noteStoreUrl is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:6> ) <EOL> oprot . writeString ( self . noteStoreUrl ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . webApiUrlPrefix is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:7> ) <EOL> oprot . writeString ( self . webApiUrlPrefix ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . secondFactorRequired is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:8> ) <EOL> oprot . writeBool ( self . secondFactorRequired ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . secondFactorDeliveryHint is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:9> ) <EOL> oprot . writeString ( self . secondFactorDeliveryHint ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . currentTime is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . authenticationToken is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . expiration is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class BootstrapSettings ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:3> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:4> , TType . STRING , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:5> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:6> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:7> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:8> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:9> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:10> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:11> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT:12> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ( <NUM_LIT> , TType . BOOL , '<STR_LIT>' , None , None , ) , <EOL> ) <EOL> def __init__ ( self , serviceHost = None , marketingUrl = None , supportUrl = None , accountEmailDomain = None , enableFacebookSharing = None , enableGiftSubscriptions = None , enableSupportTickets = None , enableSharedNotebooks = None , enableSingleNoteSharing = None , enableSponsoredAccounts = None , enableTwitterSharing = None , enableLinkedInSharing = None , enablePublicNotebooks = None , ) : <EOL> self . serviceHost = serviceHost <EOL> self . marketingUrl = marketingUrl <EOL> self . supportUrl = supportUrl <EOL> self . accountEmailDomain = accountEmailDomain <EOL> self . enableFacebookSharing = enableFacebookSharing <EOL> self . enableGiftSubscriptions = enableGiftSubscriptions <EOL> self . enableSupportTickets = enableSupportTickets <EOL> self . enableSharedNotebooks = enableSharedNotebooks <EOL> self . enableSingleNoteSharing = enableSingleNoteSharing <EOL> self . enableSponsoredAccounts = enableSponsoredAccounts <EOL> self . enableTwitterSharing = enableTwitterSharing <EOL> self . enableLinkedInSharing = enableLinkedInSharing <EOL> self . enablePublicNotebooks = enablePublicNotebooks <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRING : <EOL> self . serviceHost = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRING : <EOL> self . marketingUrl = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:3> : <EOL> if ftype == TType . STRING : <EOL> self . supportUrl = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:4> : <EOL> if ftype == TType . STRING : <EOL> self . accountEmailDomain = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:5> : <EOL> if ftype == TType . BOOL : <EOL> self . enableFacebookSharing = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:6> : <EOL> if ftype == TType . BOOL : <EOL> self . enableGiftSubscriptions = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:7> : <EOL> if ftype == TType . BOOL : <EOL> self . enableSupportTickets = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:8> : <EOL> if ftype == TType . BOOL : <EOL> self . enableSharedNotebooks = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:9> : <EOL> if ftype == TType . BOOL : <EOL> self . enableSingleNoteSharing = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:10> : <EOL> if ftype == TType . BOOL : <EOL> self . enableSponsoredAccounts = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:11> : <EOL> if ftype == TType . BOOL : <EOL> self . enableTwitterSharing = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:12> : <EOL> if ftype == TType . BOOL : <EOL> self . enableLinkedInSharing = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT> : <EOL> if ftype == TType . BOOL : <EOL> self . enablePublicNotebooks = iprot . readBool ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . serviceHost is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:1> ) <EOL> oprot . writeString ( self . serviceHost ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . marketingUrl is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:2> ) <EOL> oprot . writeString ( self . marketingUrl ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . supportUrl is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:3> ) <EOL> oprot . writeString ( self . supportUrl ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . accountEmailDomain is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRING , <NUM_LIT:4> ) <EOL> oprot . writeString ( self . accountEmailDomain ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableFacebookSharing is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:5> ) <EOL> oprot . writeBool ( self . enableFacebookSharing ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableGiftSubscriptions is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:6> ) <EOL> oprot . writeBool ( self . enableGiftSubscriptions ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableSupportTickets is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:7> ) <EOL> oprot . writeBool ( self . enableSupportTickets ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableSharedNotebooks is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:8> ) <EOL> oprot . writeBool ( self . enableSharedNotebooks ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableSingleNoteSharing is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:9> ) <EOL> oprot . writeBool ( self . enableSingleNoteSharing ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableSponsoredAccounts is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:10> ) <EOL> oprot . writeBool ( self . enableSponsoredAccounts ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableTwitterSharing is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:11> ) <EOL> oprot . writeBool ( self . enableTwitterSharing ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enableLinkedInSharing is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT:12> ) <EOL> oprot . writeBool ( self . enableLinkedInSharing ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . enablePublicNotebooks is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . BOOL , <NUM_LIT> ) <EOL> oprot . writeBool ( self . enablePublicNotebooks ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . serviceHost is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . marketingUrl is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . supportUrl is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . accountEmailDomain is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class BootstrapProfile ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . STRING , '<STR_LIT:name>' , None , None , ) , <EOL> ( <NUM_LIT:2> , TType . STRUCT , '<STR_LIT>' , ( BootstrapSettings , BootstrapSettings . thrift_spec ) , None , ) , <EOL> ) <EOL> def __init__ ( self , name = None , settings = None , ) : <EOL> self . name = name <EOL> self . settings = settings <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . STRING : <EOL> self . name = iprot . readString ( ) ; <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> elif fid == <NUM_LIT:2> : <EOL> if ftype == TType . STRUCT : <EOL> self . settings = BootstrapSettings ( ) <EOL> self . settings . read ( iprot ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . name is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT:name>' , TType . STRING , <NUM_LIT:1> ) <EOL> oprot . writeString ( self . name ) <EOL> oprot . writeFieldEnd ( ) <EOL> if self . settings is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . STRUCT , <NUM_LIT:2> ) <EOL> self . settings . write ( oprot ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . name is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> if self . settings is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) <EOL> class BootstrapInfo ( object ) : <EOL> """<STR_LIT>""" <EOL> thrift_spec = ( <EOL> None , <EOL> ( <NUM_LIT:1> , TType . LIST , '<STR_LIT>' , ( TType . STRUCT , ( BootstrapProfile , BootstrapProfile . thrift_spec ) ) , None , ) , <EOL> ) <EOL> def __init__ ( self , profiles = None , ) : <EOL> self . profiles = profiles <EOL> def read ( self , iprot ) : <EOL> if iprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and isinstance ( iprot . trans , TTransport . CReadableTransport ) and self . thrift_spec is not None and fastbinary is not None : <EOL> fastbinary . decode_binary ( self , iprot . trans , ( self . __class__ , self . thrift_spec ) ) <EOL> return <EOL> iprot . readStructBegin ( ) <EOL> while True : <EOL> ( fname , ftype , fid ) = iprot . readFieldBegin ( ) <EOL> if ftype == TType . STOP : <EOL> break <EOL> if fid == <NUM_LIT:1> : <EOL> if ftype == TType . LIST : <EOL> self . profiles = [ ] <EOL> ( _etype3 , _size0 ) = iprot . readListBegin ( ) <EOL> for _i4 in xrange ( _size0 ) : <EOL> _elem5 = BootstrapProfile ( ) <EOL> _elem5 . read ( iprot ) <EOL> self . profiles . append ( _elem5 ) <EOL> iprot . readListEnd ( ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> else : <EOL> iprot . skip ( ftype ) <EOL> iprot . readFieldEnd ( ) <EOL> iprot . readStructEnd ( ) <EOL> def write ( self , oprot ) : <EOL> if oprot . __class__ == TBinaryProtocol . TBinaryProtocolAccelerated and self . thrift_spec is not None and fastbinary is not None : <EOL> oprot . trans . write ( fastbinary . encode_binary ( self , ( self . __class__ , self . thrift_spec ) ) ) <EOL> return <EOL> oprot . writeStructBegin ( '<STR_LIT>' ) <EOL> if self . profiles is not None : <EOL> oprot . writeFieldBegin ( '<STR_LIT>' , TType . LIST , <NUM_LIT:1> ) <EOL> oprot . writeListBegin ( TType . STRUCT , len ( self . profiles ) ) <EOL> for iter6 in self . profiles : <EOL> iter6 . write ( oprot ) <EOL> oprot . writeListEnd ( ) <EOL> oprot . writeFieldEnd ( ) <EOL> oprot . writeFieldStop ( ) <EOL> oprot . writeStructEnd ( ) <EOL> def validate ( self ) : <EOL> if self . profiles is None : <EOL> raise TProtocol . TProtocolException ( message = '<STR_LIT>' ) <EOL> return <EOL> def __repr__ ( self ) : <EOL> L = [ '<STR_LIT>' % ( key , value ) <EOL> for key , value in self . __dict__ . iteritems ( ) ] <EOL> return '<STR_LIT>' % ( self . __class__ . __name__ , '<STR_LIT:U+002CU+0020>' . join ( L ) ) <EOL> def __eq__ ( self , other ) : <EOL> return isinstance ( other , self . __class__ ) and self . __dict__ == other . __dict__ <EOL> def __ne__ ( self , other ) : <EOL> return not ( self == other ) </s>
