<s> from google . net . proto import ProtocolBuffer <EOL> import array <EOL> import dummy_thread as thread <EOL> __pychecker__ = """<STR_LIT>""" <EOL> if hasattr ( ProtocolBuffer , '<STR_LIT>' ) : <EOL> _extension_runtime = True <EOL> _ExtendableProtocolMessage = ProtocolBuffer . ExtendableProtocolMessage <EOL> else : <EOL> _extension_runtime = False <EOL> _ExtendableProtocolMessage = ProtocolBuffer . ProtocolMessage <EOL> class ChannelServiceError ( ProtocolBuffer . ProtocolMessage ) : <EOL> OK = <NUM_LIT:0> <EOL> INTERNAL_ERROR = <NUM_LIT:1> <EOL> INVALID_CHANNEL_KEY = <NUM_LIT:2> <EOL> BAD_MESSAGE = <NUM_LIT:3> <EOL> INVALID_CHANNEL_TOKEN_DURATION = <NUM_LIT:4> <EOL> APPID_ALIAS_REQUIRED = <NUM_LIT:5> <EOL> _ErrorCode_NAMES = { <EOL> <NUM_LIT:0> : "<STR_LIT:OK>" , <EOL> <NUM_LIT:1> : "<STR_LIT>" , <EOL> <NUM_LIT:2> : "<STR_LIT>" , <EOL> <NUM_LIT:3> : "<STR_LIT>" , <EOL> <NUM_LIT:4> : "<STR_LIT>" , <EOL> <NUM_LIT:5> : "<STR_LIT>" , <EOL> } <EOL> def ErrorCode_Name ( cls , x ) : return cls . _ErrorCode_NAMES . get ( x , "<STR_LIT>" ) <EOL> ErrorCode_Name = classmethod ( ErrorCode_Name ) <EOL> def __init__ ( self , contents = None ) : <EOL> pass <EOL> if contents is not None : self . MergeFromString ( contents ) <EOL> def MergeFrom ( self , x ) : <EOL> assert x is not self <EOL> def Equals ( self , x ) : <EOL> if x is self : return <NUM_LIT:1> <EOL> return <NUM_LIT:1> <EOL> def IsInitialized ( self , debug_strs = None ) : <EOL> initialized = <NUM_LIT:1> <EOL> return initialized <EOL> def ByteSize ( self ) : <EOL> n = <NUM_LIT:0> <EOL> return n <EOL> def ByteSizePartial ( self ) : <EOL> n = <NUM_LIT:0> <EOL> return n <EOL> def Clear ( self ) : <EOL> pass <EOL> def OutputUnchecked ( self , out ) : <EOL> pass <EOL> def OutputPartial ( self , out ) : <EOL> pass <EOL> def TryMerge ( self , d ) : <EOL> while d . avail ( ) > <NUM_LIT:0> : <EOL> tt = d . getVarInt32 ( ) <EOL> if ( tt == <NUM_LIT:0> ) : raise ProtocolBuffer . ProtocolBufferDecodeError <EOL> d . skipData ( tt ) <EOL> def __str__ ( self , prefix = "<STR_LIT>" , printElemNumber = <NUM_LIT:0> ) : <EOL> res = "<STR_LIT>" <EOL> return res <EOL> def _BuildTagLookupTable ( sparse , maxtag , default = None ) : <EOL> return tuple ( [ sparse . get ( i , default ) for i in xrange ( <NUM_LIT:0> , <NUM_LIT:1> + maxtag ) ] ) <EOL> _TEXT = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> } , <NUM_LIT:0> ) <EOL> _TYPES = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : ProtocolBuffer . Encoder . NUMERIC , <EOL> } , <NUM_LIT:0> , ProtocolBuffer . Encoder . MAX_TYPE ) <EOL> _STYLE = """<STR_LIT>""" <EOL> _STYLE_CONTENT_TYPE = """<STR_LIT>""" <EOL> _PROTO_DESCRIPTOR_NAME = '<STR_LIT>' <EOL> class CreateChannelRequest ( ProtocolBuffer . ProtocolMessage ) : <EOL> has_application_key_ = <NUM_LIT:0> <EOL> application_key_ = "<STR_LIT>" <EOL> has_duration_minutes_ = <NUM_LIT:0> <EOL> duration_minutes_ = <NUM_LIT:0> <EOL> def __init__ ( self , contents = None ) : <EOL> if contents is not None : self . MergeFromString ( contents ) <EOL> def application_key ( self ) : return self . application_key_ <EOL> def set_application_key ( self , x ) : <EOL> self . has_application_key_ = <NUM_LIT:1> <EOL> self . application_key_ = x <EOL> def clear_application_key ( self ) : <EOL> if self . has_application_key_ : <EOL> self . has_application_key_ = <NUM_LIT:0> <EOL> self . application_key_ = "<STR_LIT>" <EOL> def has_application_key ( self ) : return self . has_application_key_ <EOL> def duration_minutes ( self ) : return self . duration_minutes_ <EOL> def set_duration_minutes ( self , x ) : <EOL> self . has_duration_minutes_ = <NUM_LIT:1> <EOL> self . duration_minutes_ = x <EOL> def clear_duration_minutes ( self ) : <EOL> if self . has_duration_minutes_ : <EOL> self . has_duration_minutes_ = <NUM_LIT:0> <EOL> self . duration_minutes_ = <NUM_LIT:0> <EOL> def has_duration_minutes ( self ) : return self . has_duration_minutes_ <EOL> def MergeFrom ( self , x ) : <EOL> assert x is not self <EOL> if ( x . has_application_key ( ) ) : self . set_application_key ( x . application_key ( ) ) <EOL> if ( x . has_duration_minutes ( ) ) : self . set_duration_minutes ( x . duration_minutes ( ) ) <EOL> def Equals ( self , x ) : <EOL> if x is self : return <NUM_LIT:1> <EOL> if self . has_application_key_ != x . has_application_key_ : return <NUM_LIT:0> <EOL> if self . has_application_key_ and self . application_key_ != x . application_key_ : return <NUM_LIT:0> <EOL> if self . has_duration_minutes_ != x . has_duration_minutes_ : return <NUM_LIT:0> <EOL> if self . has_duration_minutes_ and self . duration_minutes_ != x . duration_minutes_ : return <NUM_LIT:0> <EOL> return <NUM_LIT:1> <EOL> def IsInitialized ( self , debug_strs = None ) : <EOL> initialized = <NUM_LIT:1> <EOL> if ( not self . has_application_key_ ) : <EOL> initialized = <NUM_LIT:0> <EOL> if debug_strs is not None : <EOL> debug_strs . append ( '<STR_LIT>' ) <EOL> return initialized <EOL> def ByteSize ( self ) : <EOL> n = <NUM_LIT:0> <EOL> n += self . lengthString ( len ( self . application_key_ ) ) <EOL> if ( self . has_duration_minutes_ ) : n += <NUM_LIT:1> + self . lengthVarInt64 ( self . duration_minutes_ ) <EOL> return n + <NUM_LIT:1> <EOL> def ByteSizePartial ( self ) : <EOL> n = <NUM_LIT:0> <EOL> if ( self . has_application_key_ ) : <EOL> n += <NUM_LIT:1> <EOL> n += self . lengthString ( len ( self . application_key_ ) ) <EOL> if ( self . has_duration_minutes_ ) : n += <NUM_LIT:1> + self . lengthVarInt64 ( self . duration_minutes_ ) <EOL> return n <EOL> def Clear ( self ) : <EOL> self . clear_application_key ( ) <EOL> self . clear_duration_minutes ( ) <EOL> def OutputUnchecked ( self , out ) : <EOL> out . putVarInt32 ( <NUM_LIT:10> ) <EOL> out . putPrefixedString ( self . application_key_ ) <EOL> if ( self . has_duration_minutes_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:16> ) <EOL> out . putVarInt32 ( self . duration_minutes_ ) <EOL> def OutputPartial ( self , out ) : <EOL> if ( self . has_application_key_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:10> ) <EOL> out . putPrefixedString ( self . application_key_ ) <EOL> if ( self . has_duration_minutes_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:16> ) <EOL> out . putVarInt32 ( self . duration_minutes_ ) <EOL> def TryMerge ( self , d ) : <EOL> while d . avail ( ) > <NUM_LIT:0> : <EOL> tt = d . getVarInt32 ( ) <EOL> if tt == <NUM_LIT:10> : <EOL> self . set_application_key ( d . getPrefixedString ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT:16> : <EOL> self . set_duration_minutes ( d . getVarInt32 ( ) ) <EOL> continue <EOL> if ( tt == <NUM_LIT:0> ) : raise ProtocolBuffer . ProtocolBufferDecodeError <EOL> d . skipData ( tt ) <EOL> def __str__ ( self , prefix = "<STR_LIT>" , printElemNumber = <NUM_LIT:0> ) : <EOL> res = "<STR_LIT>" <EOL> if self . has_application_key_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatString ( self . application_key_ ) ) <EOL> if self . has_duration_minutes_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatInt32 ( self . duration_minutes_ ) ) <EOL> return res <EOL> def _BuildTagLookupTable ( sparse , maxtag , default = None ) : <EOL> return tuple ( [ sparse . get ( i , default ) for i in xrange ( <NUM_LIT:0> , <NUM_LIT:1> + maxtag ) ] ) <EOL> kapplication_key = <NUM_LIT:1> <EOL> kduration_minutes = <NUM_LIT:2> <EOL> _TEXT = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> <NUM_LIT:1> : "<STR_LIT>" , <EOL> <NUM_LIT:2> : "<STR_LIT>" , <EOL> } , <NUM_LIT:2> ) <EOL> _TYPES = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : ProtocolBuffer . Encoder . NUMERIC , <EOL> <NUM_LIT:1> : ProtocolBuffer . Encoder . STRING , <EOL> <NUM_LIT:2> : ProtocolBuffer . Encoder . NUMERIC , <EOL> } , <NUM_LIT:2> , ProtocolBuffer . Encoder . MAX_TYPE ) <EOL> _STYLE = """<STR_LIT>""" <EOL> _STYLE_CONTENT_TYPE = """<STR_LIT>""" <EOL> _PROTO_DESCRIPTOR_NAME = '<STR_LIT>' <EOL> class CreateChannelResponse ( ProtocolBuffer . ProtocolMessage ) : <EOL> has_token_ = <NUM_LIT:0> <EOL> token_ = "<STR_LIT>" <EOL> has_duration_minutes_ = <NUM_LIT:0> <EOL> duration_minutes_ = <NUM_LIT:0> <EOL> def __init__ ( self , contents = None ) : <EOL> if contents is not None : self . MergeFromString ( contents ) <EOL> def token ( self ) : return self . token_ <EOL> def set_token ( self , x ) : <EOL> self . has_token_ = <NUM_LIT:1> <EOL> self . token_ = x <EOL> def clear_token ( self ) : <EOL> if self . has_token_ : <EOL> self . has_token_ = <NUM_LIT:0> <EOL> self . token_ = "<STR_LIT>" <EOL> def has_token ( self ) : return self . has_token_ <EOL> def duration_minutes ( self ) : return self . duration_minutes_ <EOL> def set_duration_minutes ( self , x ) : <EOL> self . has_duration_minutes_ = <NUM_LIT:1> <EOL> self . duration_minutes_ = x <EOL> def clear_duration_minutes ( self ) : <EOL> if self . has_duration_minutes_ : <EOL> self . has_duration_minutes_ = <NUM_LIT:0> <EOL> self . duration_minutes_ = <NUM_LIT:0> <EOL> def has_duration_minutes ( self ) : return self . has_duration_minutes_ <EOL> def MergeFrom ( self , x ) : <EOL> assert x is not self <EOL> if ( x . has_token ( ) ) : self . set_token ( x . token ( ) ) <EOL> if ( x . has_duration_minutes ( ) ) : self . set_duration_minutes ( x . duration_minutes ( ) ) <EOL> def Equals ( self , x ) : <EOL> if x is self : return <NUM_LIT:1> <EOL> if self . has_token_ != x . has_token_ : return <NUM_LIT:0> <EOL> if self . has_token_ and self . token_ != x . token_ : return <NUM_LIT:0> <EOL> if self . has_duration_minutes_ != x . has_duration_minutes_ : return <NUM_LIT:0> <EOL> if self . has_duration_minutes_ and self . duration_minutes_ != x . duration_minutes_ : return <NUM_LIT:0> <EOL> return <NUM_LIT:1> <EOL> def IsInitialized ( self , debug_strs = None ) : <EOL> initialized = <NUM_LIT:1> <EOL> return initialized <EOL> def ByteSize ( self ) : <EOL> n = <NUM_LIT:0> <EOL> if ( self . has_token_ ) : n += <NUM_LIT:1> + self . lengthString ( len ( self . token_ ) ) <EOL> if ( self . has_duration_minutes_ ) : n += <NUM_LIT:1> + self . lengthVarInt64 ( self . duration_minutes_ ) <EOL> return n <EOL> def ByteSizePartial ( self ) : <EOL> n = <NUM_LIT:0> <EOL> if ( self . has_token_ ) : n += <NUM_LIT:1> + self . lengthString ( len ( self . token_ ) ) <EOL> if ( self . has_duration_minutes_ ) : n += <NUM_LIT:1> + self . lengthVarInt64 ( self . duration_minutes_ ) <EOL> return n <EOL> def Clear ( self ) : <EOL> self . clear_token ( ) <EOL> self . clear_duration_minutes ( ) <EOL> def OutputUnchecked ( self , out ) : <EOL> if ( self . has_token_ ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . token_ ) <EOL> if ( self . has_duration_minutes_ ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putVarInt32 ( self . duration_minutes_ ) <EOL> def OutputPartial ( self , out ) : <EOL> if ( self . has_token_ ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . token_ ) <EOL> if ( self . has_duration_minutes_ ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putVarInt32 ( self . duration_minutes_ ) <EOL> def TryMerge ( self , d ) : <EOL> while d . avail ( ) > <NUM_LIT:0> : <EOL> tt = d . getVarInt32 ( ) <EOL> if tt == <NUM_LIT> : <EOL> self . set_token ( d . getPrefixedString ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT> : <EOL> self . set_duration_minutes ( d . getVarInt32 ( ) ) <EOL> continue <EOL> if ( tt == <NUM_LIT:0> ) : raise ProtocolBuffer . ProtocolBufferDecodeError <EOL> d . skipData ( tt ) <EOL> def __str__ ( self , prefix = "<STR_LIT>" , printElemNumber = <NUM_LIT:0> ) : <EOL> res = "<STR_LIT>" <EOL> if self . has_token_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatString ( self . token_ ) ) <EOL> if self . has_duration_minutes_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatInt32 ( self . duration_minutes_ ) ) <EOL> return res <EOL> def _BuildTagLookupTable ( sparse , maxtag , default = None ) : <EOL> return tuple ( [ sparse . get ( i , default ) for i in xrange ( <NUM_LIT:0> , <NUM_LIT:1> + maxtag ) ] ) <EOL> ktoken = <NUM_LIT:2> <EOL> kduration_minutes = <NUM_LIT:3> <EOL> _TEXT = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> <NUM_LIT:2> : "<STR_LIT>" , <EOL> <NUM_LIT:3> : "<STR_LIT>" , <EOL> } , <NUM_LIT:3> ) <EOL> _TYPES = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : ProtocolBuffer . Encoder . NUMERIC , <EOL> <NUM_LIT:2> : ProtocolBuffer . Encoder . STRING , <EOL> <NUM_LIT:3> : ProtocolBuffer . Encoder . NUMERIC , <EOL> } , <NUM_LIT:3> , ProtocolBuffer . Encoder . MAX_TYPE ) <EOL> _STYLE = """<STR_LIT>""" <EOL> _STYLE_CONTENT_TYPE = """<STR_LIT>""" <EOL> _PROTO_DESCRIPTOR_NAME = '<STR_LIT>' <EOL> class SendMessageRequest ( ProtocolBuffer . ProtocolMessage ) : <EOL> has_application_key_ = <NUM_LIT:0> <EOL> application_key_ = "<STR_LIT>" <EOL> has_message_ = <NUM_LIT:0> <EOL> message_ = "<STR_LIT>" <EOL> def __init__ ( self , contents = None ) : <EOL> if contents is not None : self . MergeFromString ( contents ) <EOL> def application_key ( self ) : return self . application_key_ <EOL> def set_application_key ( self , x ) : <EOL> self . has_application_key_ = <NUM_LIT:1> <EOL> self . application_key_ = x <EOL> def clear_application_key ( self ) : <EOL> if self . has_application_key_ : <EOL> self . has_application_key_ = <NUM_LIT:0> <EOL> self . application_key_ = "<STR_LIT>" <EOL> def has_application_key ( self ) : return self . has_application_key_ <EOL> def message ( self ) : return self . message_ <EOL> def set_message ( self , x ) : <EOL> self . has_message_ = <NUM_LIT:1> <EOL> self . message_ = x <EOL> def clear_message ( self ) : <EOL> if self . has_message_ : <EOL> self . has_message_ = <NUM_LIT:0> <EOL> self . message_ = "<STR_LIT>" <EOL> def has_message ( self ) : return self . has_message_ <EOL> def MergeFrom ( self , x ) : <EOL> assert x is not self <EOL> if ( x . has_application_key ( ) ) : self . set_application_key ( x . application_key ( ) ) <EOL> if ( x . has_message ( ) ) : self . set_message ( x . message ( ) ) <EOL> def Equals ( self , x ) : <EOL> if x is self : return <NUM_LIT:1> <EOL> if self . has_application_key_ != x . has_application_key_ : return <NUM_LIT:0> <EOL> if self . has_application_key_ and self . application_key_ != x . application_key_ : return <NUM_LIT:0> <EOL> if self . has_message_ != x . has_message_ : return <NUM_LIT:0> <EOL> if self . has_message_ and self . message_ != x . message_ : return <NUM_LIT:0> <EOL> return <NUM_LIT:1> <EOL> def IsInitialized ( self , debug_strs = None ) : <EOL> initialized = <NUM_LIT:1> <EOL> if ( not self . has_application_key_ ) : <EOL> initialized = <NUM_LIT:0> <EOL> if debug_strs is not None : <EOL> debug_strs . append ( '<STR_LIT>' ) <EOL> if ( not self . has_message_ ) : <EOL> initialized = <NUM_LIT:0> <EOL> if debug_strs is not None : <EOL> debug_strs . append ( '<STR_LIT>' ) <EOL> return initialized <EOL> def ByteSize ( self ) : <EOL> n = <NUM_LIT:0> <EOL> n += self . lengthString ( len ( self . application_key_ ) ) <EOL> n += self . lengthString ( len ( self . message_ ) ) <EOL> return n + <NUM_LIT:2> <EOL> def ByteSizePartial ( self ) : <EOL> n = <NUM_LIT:0> <EOL> if ( self . has_application_key_ ) : <EOL> n += <NUM_LIT:1> <EOL> n += self . lengthString ( len ( self . application_key_ ) ) <EOL> if ( self . has_message_ ) : <EOL> n += <NUM_LIT:1> <EOL> n += self . lengthString ( len ( self . message_ ) ) <EOL> return n <EOL> def Clear ( self ) : <EOL> self . clear_application_key ( ) <EOL> self . clear_message ( ) <EOL> def OutputUnchecked ( self , out ) : <EOL> out . putVarInt32 ( <NUM_LIT:10> ) <EOL> out . putPrefixedString ( self . application_key_ ) <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . message_ ) <EOL> def OutputPartial ( self , out ) : <EOL> if ( self . has_application_key_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:10> ) <EOL> out . putPrefixedString ( self . application_key_ ) <EOL> if ( self . has_message_ ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . message_ ) <EOL> def TryMerge ( self , d ) : <EOL> while d . avail ( ) > <NUM_LIT:0> : <EOL> tt = d . getVarInt32 ( ) <EOL> if tt == <NUM_LIT:10> : <EOL> self . set_application_key ( d . getPrefixedString ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT> : <EOL> self . set_message ( d . getPrefixedString ( ) ) <EOL> continue <EOL> if ( tt == <NUM_LIT:0> ) : raise ProtocolBuffer . ProtocolBufferDecodeError <EOL> d . skipData ( tt ) <EOL> def __str__ ( self , prefix = "<STR_LIT>" , printElemNumber = <NUM_LIT:0> ) : <EOL> res = "<STR_LIT>" <EOL> if self . has_application_key_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatString ( self . application_key_ ) ) <EOL> if self . has_message_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatString ( self . message_ ) ) <EOL> return res <EOL> def _BuildTagLookupTable ( sparse , maxtag , default = None ) : <EOL> return tuple ( [ sparse . get ( i , default ) for i in xrange ( <NUM_LIT:0> , <NUM_LIT:1> + maxtag ) ] ) <EOL> kapplication_key = <NUM_LIT:1> <EOL> kmessage = <NUM_LIT:2> <EOL> _TEXT = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> <NUM_LIT:1> : "<STR_LIT>" , <EOL> <NUM_LIT:2> : "<STR_LIT:message>" , <EOL> } , <NUM_LIT:2> ) <EOL> _TYPES = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : ProtocolBuffer . Encoder . NUMERIC , <EOL> <NUM_LIT:1> : ProtocolBuffer . Encoder . STRING , <EOL> <NUM_LIT:2> : ProtocolBuffer . Encoder . STRING , <EOL> } , <NUM_LIT:2> , ProtocolBuffer . Encoder . MAX_TYPE ) <EOL> _STYLE = """<STR_LIT>""" <EOL> _STYLE_CONTENT_TYPE = """<STR_LIT>""" <EOL> _PROTO_DESCRIPTOR_NAME = '<STR_LIT>' <EOL> if _extension_runtime : <EOL> pass <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] </s>
