<s> """<STR_LIT>""" <EOL> from google . appengine . api import apiproxy_stub <EOL> from google . appengine . api import capabilities <EOL> IsEnabledRequest = capabilities . IsEnabledRequest <EOL> IsEnabledResponse = capabilities . IsEnabledResponse <EOL> CapabilityConfig = capabilities . CapabilityConfig <EOL> SUPPORTED_CAPABILITIES = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) <EOL> class CapabilityServiceStub ( apiproxy_stub . APIProxyStub ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , service_name = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> super ( CapabilityServiceStub , self ) . __init__ ( service_name ) <EOL> self . _packages = dict . fromkeys ( SUPPORTED_CAPABILITIES , True ) <EOL> def SetPackageEnabled ( self , package , enabled ) : <EOL> """<STR_LIT>""" <EOL> self . _packages [ package ] = enabled <EOL> def _Dynamic_IsEnabled ( self , request , response ) : <EOL> """<STR_LIT>""" <EOL> default_config = response . add_config ( ) <EOL> default_config . set_package ( '<STR_LIT>' ) <EOL> default_config . set_capability ( '<STR_LIT>' ) <EOL> try : <EOL> package_enabled = self . _packages [ request . package ( ) ] <EOL> except KeyError : <EOL> summary_status = IsEnabledResponse . UNKNOWN <EOL> config_status = CapabilityConfig . UNKNOWN <EOL> else : <EOL> if package_enabled : <EOL> summary_status = IsEnabledResponse . ENABLED <EOL> config_status = CapabilityConfig . ENABLED <EOL> else : <EOL> summary_status = IsEnabledResponse . DISABLED <EOL> config_status = CapabilityConfig . DISABLED <EOL> response . set_summary_status ( summary_status ) <EOL> default_config . set_status ( config_status ) </s>
