
    >                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	   " S S	\
5      r " S
 S\
5      r " S S\
5      r " S S\
5      rg)z6API map classes used with the CloudApiDelegator class.    )absolute_import)print_function)division)unicode_literals)BotoTranslation)
GcsJsonApic                        \ rS rSrSrSrSrSrg)ApiSelector   zEnum class for API.XMLJSON N)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__r       #platform/gsutil/gslib/cs_api_map.pyr
   r
      s    #	$r   r
   c                   $    \ rS rSrSrSrSrSrSrg)ApiMapConstants    zEnum class for API map entries.apiclass	supporteddefaultr   N)	r   r   r   r   r   API_MAPSUPPORT_MAPDEFAULT_MAPr   r   r   r   r   r       s    ''++r   r   c                   (    \ rS rSrSr\S 5       rSrg)GsutilApiClassMapFactory'   a  Factory for generating gsutil API class maps.

A valid class map is defined as:
  {
    (key) Provider prefix used in URI strings.
    (value) {
      (key) ApiSelector describing the API format.
      (value) CloudApi child class that implements this API.
    }
  }
c                     [         R                  [        [         R                  [        0n[         R                  [        0nUUS.nU$ )z%Returns the default gsutil class map.)gss3)r
   r   r   r   r   )clsgs_class_maps3_class_map	class_maps       r   GetClassMap$GsutilApiClassMapFactory.GetClassMap4   sH     	*L
 	L I r   r   N)r   r   r   r   r   classmethodr*   r   r   r   r   r!   r!   '   s    
  r   r!   c                   (    \ rS rSrSr\S 5       rSrg)GsutilApiMapFactoryE   av  Factory the generates the default gsutil API map.

The API map determines which Cloud API implementation is used for a given
command.  A valid API map is defined as:
{
  (key) ApiMapConstants.API_MAP : (value) Gsutil API class map (as
      described in GsutilApiClassMapFactory comments).
  (key) ApiMapConstants.SUPPORT_MAP : (value) {
    (key) Provider prefix used in URI strings.
    (value) list of ApiSelectors supported by the command for this provider.
  }
  (key) ApiMapConstants.DEFAULT_MAP : (value) {
    (key) Provider prefix used in URI strings.
    (value) Default ApiSelector for this command and provider.
  }
}
c                     [         R                  UR                  5       [         R                  U[         R                  U0$ )a  Creates a GsutilApiMap for use by the command from the inputs.

Args:
  gsutil_api_class_map_factory: Factory defining a GetClassMap() function
                                adhering to GsutilApiClassMapFactory
                                semantics.
  support_map: Entries for ApiMapConstants.SUPPORT_MAP as described above.
  default_map: Entries for ApiMapConstants.DEFAULT_MAP as described above.

Returns:
  GsutilApiMap generated from the inputs.
)r   r   r*   r   r   )r&   gsutil_api_class_map_factorysupport_mapdefault_maps       r   	GetApiMapGsutilApiMapFactory.GetApiMapX   s9     	!=!I!I!K##[##[ r   r   N)r   r   r   r   r   r,   r4   r   r   r   r   r.   r.   E   s    $  r   r.   N)r   
__future__r   r   r   r   gslib.boto_translationr   gslib.gcs_json_apir   objectr
   r   r!   r.   r   r   r   <module>r:      sL    = & %  ' 2 )& f v <%& %r   