<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> from google . appengine . base . capabilities_pb import * <EOL> import google . appengine . base . capabilities_pb <EOL> class IsEnabledRequest ( ProtocolBuffer . ProtocolMessage ) : <EOL> has_package_ = <NUM_LIT:0> <EOL> package_ = "<STR_LIT>" <EOL> def __init__ ( self , contents = None ) : <EOL> self . capability_ = [ ] <EOL> self . call_ = [ ] <EOL> if contents is not None : self . MergeFromString ( contents ) <EOL> def package ( self ) : return self . package_ <EOL> def set_package ( self , x ) : <EOL> self . has_package_ = <NUM_LIT:1> <EOL> self . package_ = x <EOL> def clear_package ( self ) : <EOL> if self . has_package_ : <EOL> self . has_package_ = <NUM_LIT:0> <EOL> self . package_ = "<STR_LIT>" <EOL> def has_package ( self ) : return self . has_package_ <EOL> def capability_size ( self ) : return len ( self . capability_ ) <EOL> def capability_list ( self ) : return self . capability_ <EOL> def capability ( self , i ) : <EOL> return self . capability_ [ i ] <EOL> def set_capability ( self , i , x ) : <EOL> self . capability_ [ i ] = x <EOL> def add_capability ( self , x ) : <EOL> self . capability_ . append ( x ) <EOL> def clear_capability ( self ) : <EOL> self . capability_ = [ ] <EOL> def call_size ( self ) : return len ( self . call_ ) <EOL> def call_list ( self ) : return self . call_ <EOL> def call ( self , i ) : <EOL> return self . call_ [ i ] <EOL> def set_call ( self , i , x ) : <EOL> self . call_ [ i ] = x <EOL> def add_call ( self , x ) : <EOL> self . call_ . append ( x ) <EOL> def clear_call ( self ) : <EOL> self . call_ = [ ] <EOL> def MergeFrom ( self , x ) : <EOL> assert x is not self <EOL> if ( x . has_package ( ) ) : self . set_package ( x . package ( ) ) <EOL> for i in xrange ( x . capability_size ( ) ) : self . add_capability ( x . capability ( i ) ) <EOL> for i in xrange ( x . call_size ( ) ) : self . add_call ( x . call ( i ) ) <EOL> def Equals ( self , x ) : <EOL> if x is self : return <NUM_LIT:1> <EOL> if self . has_package_ != x . has_package_ : return <NUM_LIT:0> <EOL> if self . has_package_ and self . package_ != x . package_ : return <NUM_LIT:0> <EOL> if len ( self . capability_ ) != len ( x . capability_ ) : return <NUM_LIT:0> <EOL> for e1 , e2 in zip ( self . capability_ , x . capability_ ) : <EOL> if e1 != e2 : return <NUM_LIT:0> <EOL> if len ( self . call_ ) != len ( x . call_ ) : return <NUM_LIT:0> <EOL> for e1 , e2 in zip ( self . call_ , x . call_ ) : <EOL> if e1 != e2 : 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_package_ ) : <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 . package_ ) ) <EOL> n += <NUM_LIT:1> * len ( self . capability_ ) <EOL> for i in xrange ( len ( self . capability_ ) ) : n += self . lengthString ( len ( self . capability_ [ i ] ) ) <EOL> n += <NUM_LIT:1> * len ( self . call_ ) <EOL> for i in xrange ( len ( self . call_ ) ) : n += self . lengthString ( len ( self . call_ [ i ] ) ) <EOL> return n + <NUM_LIT:1> <EOL> def ByteSizePartial ( self ) : <EOL> n = <NUM_LIT:0> <EOL> if ( self . has_package_ ) : <EOL> n += <NUM_LIT:1> <EOL> n += self . lengthString ( len ( self . package_ ) ) <EOL> n += <NUM_LIT:1> * len ( self . capability_ ) <EOL> for i in xrange ( len ( self . capability_ ) ) : n += self . lengthString ( len ( self . capability_ [ i ] ) ) <EOL> n += <NUM_LIT:1> * len ( self . call_ ) <EOL> for i in xrange ( len ( self . call_ ) ) : n += self . lengthString ( len ( self . call_ [ i ] ) ) <EOL> return n <EOL> def Clear ( self ) : <EOL> self . clear_package ( ) <EOL> self . clear_capability ( ) <EOL> self . clear_call ( ) <EOL> def OutputUnchecked ( self , out ) : <EOL> out . putVarInt32 ( <NUM_LIT:10> ) <EOL> out . putPrefixedString ( self . package_ ) <EOL> for i in xrange ( len ( self . capability_ ) ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . capability_ [ i ] ) <EOL> for i in xrange ( len ( self . call_ ) ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . call_ [ i ] ) <EOL> def OutputPartial ( self , out ) : <EOL> if ( self . has_package_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:10> ) <EOL> out . putPrefixedString ( self . package_ ) <EOL> for i in xrange ( len ( self . capability_ ) ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . capability_ [ i ] ) <EOL> for i in xrange ( len ( self . call_ ) ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putPrefixedString ( self . call_ [ i ] ) <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_package ( d . getPrefixedString ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT> : <EOL> self . add_capability ( d . getPrefixedString ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT> : <EOL> self . add_call ( 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_package_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatString ( self . package_ ) ) <EOL> cnt = <NUM_LIT:0> <EOL> for e in self . capability_ : <EOL> elm = "<STR_LIT>" <EOL> if printElemNumber : elm = "<STR_LIT>" % cnt <EOL> res += prefix + ( "<STR_LIT>" % ( elm , self . DebugFormatString ( e ) ) ) <EOL> cnt += <NUM_LIT:1> <EOL> cnt = <NUM_LIT:0> <EOL> for e in self . call_ : <EOL> elm = "<STR_LIT>" <EOL> if printElemNumber : elm = "<STR_LIT>" % cnt <EOL> res += prefix + ( "<STR_LIT>" % ( elm , self . DebugFormatString ( e ) ) ) <EOL> cnt += <NUM_LIT:1> <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> kpackage = <NUM_LIT:1> <EOL> kcapability = <NUM_LIT:2> <EOL> kcall = <NUM_LIT:3> <EOL> _TEXT = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> <NUM_LIT:1> : "<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:1> : ProtocolBuffer . Encoder . STRING , <EOL> <NUM_LIT:2> : ProtocolBuffer . Encoder . STRING , <EOL> <NUM_LIT:3> : ProtocolBuffer . Encoder . STRING , <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 IsEnabledResponse ( ProtocolBuffer . ProtocolMessage ) : <EOL> ENABLED = <NUM_LIT:1> <EOL> SCHEDULED_FUTURE = <NUM_LIT:2> <EOL> SCHEDULED_NOW = <NUM_LIT:3> <EOL> DISABLED = <NUM_LIT:4> <EOL> UNKNOWN = <NUM_LIT:5> <EOL> _SummaryStatus_NAMES = { <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 SummaryStatus_Name ( cls , x ) : return cls . _SummaryStatus_NAMES . get ( x , "<STR_LIT>" ) <EOL> SummaryStatus_Name = classmethod ( SummaryStatus_Name ) <EOL> has_summary_status_ = <NUM_LIT:0> <EOL> summary_status_ = <NUM_LIT:0> <EOL> has_time_until_scheduled_ = <NUM_LIT:0> <EOL> time_until_scheduled_ = <NUM_LIT:0> <EOL> def __init__ ( self , contents = None ) : <EOL> self . config_ = [ ] <EOL> if contents is not None : self . MergeFromString ( contents ) <EOL> def summary_status ( self ) : return self . summary_status_ <EOL> def set_summary_status ( self , x ) : <EOL> self . has_summary_status_ = <NUM_LIT:1> <EOL> self . summary_status_ = x <EOL> def clear_summary_status ( self ) : <EOL> if self . has_summary_status_ : <EOL> self . has_summary_status_ = <NUM_LIT:0> <EOL> self . summary_status_ = <NUM_LIT:0> <EOL> def has_summary_status ( self ) : return self . has_summary_status_ <EOL> def time_until_scheduled ( self ) : return self . time_until_scheduled_ <EOL> def set_time_until_scheduled ( self , x ) : <EOL> self . has_time_until_scheduled_ = <NUM_LIT:1> <EOL> self . time_until_scheduled_ = x <EOL> def clear_time_until_scheduled ( self ) : <EOL> if self . has_time_until_scheduled_ : <EOL> self . has_time_until_scheduled_ = <NUM_LIT:0> <EOL> self . time_until_scheduled_ = <NUM_LIT:0> <EOL> def has_time_until_scheduled ( self ) : return self . has_time_until_scheduled_ <EOL> def config_size ( self ) : return len ( self . config_ ) <EOL> def config_list ( self ) : return self . config_ <EOL> def config ( self , i ) : <EOL> return self . config_ [ i ] <EOL> def mutable_config ( self , i ) : <EOL> return self . config_ [ i ] <EOL> def add_config ( self ) : <EOL> x = CapabilityConfig ( ) <EOL> self . config_ . append ( x ) <EOL> return x <EOL> def clear_config ( self ) : <EOL> self . config_ = [ ] <EOL> def MergeFrom ( self , x ) : <EOL> assert x is not self <EOL> if ( x . has_summary_status ( ) ) : self . set_summary_status ( x . summary_status ( ) ) <EOL> if ( x . has_time_until_scheduled ( ) ) : self . set_time_until_scheduled ( x . time_until_scheduled ( ) ) <EOL> for i in xrange ( x . config_size ( ) ) : self . add_config ( ) . CopyFrom ( x . config ( i ) ) <EOL> def Equals ( self , x ) : <EOL> if x is self : return <NUM_LIT:1> <EOL> if self . has_summary_status_ != x . has_summary_status_ : return <NUM_LIT:0> <EOL> if self . has_summary_status_ and self . summary_status_ != x . summary_status_ : return <NUM_LIT:0> <EOL> if self . has_time_until_scheduled_ != x . has_time_until_scheduled_ : return <NUM_LIT:0> <EOL> if self . has_time_until_scheduled_ and self . time_until_scheduled_ != x . time_until_scheduled_ : return <NUM_LIT:0> <EOL> if len ( self . config_ ) != len ( x . config_ ) : return <NUM_LIT:0> <EOL> for e1 , e2 in zip ( self . config_ , x . config_ ) : <EOL> if e1 != e2 : 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_summary_status_ ) : <EOL> initialized = <NUM_LIT:0> <EOL> if debug_strs is not None : <EOL> debug_strs . append ( '<STR_LIT>' ) <EOL> for p in self . config_ : <EOL> if not p . IsInitialized ( debug_strs ) : initialized = <NUM_LIT:0> <EOL> return initialized <EOL> def ByteSize ( self ) : <EOL> n = <NUM_LIT:0> <EOL> n += self . lengthVarInt64 ( self . summary_status_ ) <EOL> if ( self . has_time_until_scheduled_ ) : n += <NUM_LIT:1> + self . lengthVarInt64 ( self . time_until_scheduled_ ) <EOL> n += <NUM_LIT:1> * len ( self . config_ ) <EOL> for i in xrange ( len ( self . config_ ) ) : n += self . lengthString ( self . config_ [ i ] . ByteSize ( ) ) <EOL> return n + <NUM_LIT:1> <EOL> def ByteSizePartial ( self ) : <EOL> n = <NUM_LIT:0> <EOL> if ( self . has_summary_status_ ) : <EOL> n += <NUM_LIT:1> <EOL> n += self . lengthVarInt64 ( self . summary_status_ ) <EOL> if ( self . has_time_until_scheduled_ ) : n += <NUM_LIT:1> + self . lengthVarInt64 ( self . time_until_scheduled_ ) <EOL> n += <NUM_LIT:1> * len ( self . config_ ) <EOL> for i in xrange ( len ( self . config_ ) ) : n += self . lengthString ( self . config_ [ i ] . ByteSizePartial ( ) ) <EOL> return n <EOL> def Clear ( self ) : <EOL> self . clear_summary_status ( ) <EOL> self . clear_time_until_scheduled ( ) <EOL> self . clear_config ( ) <EOL> def OutputUnchecked ( self , out ) : <EOL> out . putVarInt32 ( <NUM_LIT:8> ) <EOL> out . putVarInt32 ( self . summary_status_ ) <EOL> if ( self . has_time_until_scheduled_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:16> ) <EOL> out . putVarInt64 ( self . time_until_scheduled_ ) <EOL> for i in xrange ( len ( self . config_ ) ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putVarInt32 ( self . config_ [ i ] . ByteSize ( ) ) <EOL> self . config_ [ i ] . OutputUnchecked ( out ) <EOL> def OutputPartial ( self , out ) : <EOL> if ( self . has_summary_status_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:8> ) <EOL> out . putVarInt32 ( self . summary_status_ ) <EOL> if ( self . has_time_until_scheduled_ ) : <EOL> out . putVarInt32 ( <NUM_LIT:16> ) <EOL> out . putVarInt64 ( self . time_until_scheduled_ ) <EOL> for i in xrange ( len ( self . config_ ) ) : <EOL> out . putVarInt32 ( <NUM_LIT> ) <EOL> out . putVarInt32 ( self . config_ [ i ] . ByteSizePartial ( ) ) <EOL> self . config_ [ i ] . OutputPartial ( out ) <EOL> def TryMerge ( self , d ) : <EOL> while d . avail ( ) > <NUM_LIT:0> : <EOL> tt = d . getVarInt32 ( ) <EOL> if tt == <NUM_LIT:8> : <EOL> self . set_summary_status ( d . getVarInt32 ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT:16> : <EOL> self . set_time_until_scheduled ( d . getVarInt64 ( ) ) <EOL> continue <EOL> if tt == <NUM_LIT> : <EOL> length = d . getVarInt32 ( ) <EOL> tmp = ProtocolBuffer . Decoder ( d . buffer ( ) , d . pos ( ) , d . pos ( ) + length ) <EOL> d . skip ( length ) <EOL> self . add_config ( ) . TryMerge ( tmp ) <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_summary_status_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatInt32 ( self . summary_status_ ) ) <EOL> if self . has_time_until_scheduled_ : res += prefix + ( "<STR_LIT>" % self . DebugFormatInt64 ( self . time_until_scheduled_ ) ) <EOL> cnt = <NUM_LIT:0> <EOL> for e in self . config_ : <EOL> elm = "<STR_LIT>" <EOL> if printElemNumber : elm = "<STR_LIT>" % cnt <EOL> res += prefix + ( "<STR_LIT>" % elm ) <EOL> res += e . __str__ ( prefix + "<STR_LIT:U+0020>" , printElemNumber ) <EOL> res += prefix + "<STR_LIT>" <EOL> cnt += <NUM_LIT:1> <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> ksummary_status = <NUM_LIT:1> <EOL> ktime_until_scheduled = <NUM_LIT:2> <EOL> kconfig = <NUM_LIT:3> <EOL> _TEXT = _BuildTagLookupTable ( { <EOL> <NUM_LIT:0> : "<STR_LIT>" , <EOL> <NUM_LIT:1> : "<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:1> : ProtocolBuffer . Encoder . NUMERIC , <EOL> <NUM_LIT:2> : ProtocolBuffer . Encoder . NUMERIC , <EOL> <NUM_LIT:3> : ProtocolBuffer . Encoder . STRING , <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> if _extension_runtime : <EOL> pass <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' ] </s>
