File: //opt/gsutil/third_party/apitools/apitools/base/py/__pycache__/base_api.cpython-39.pyc
a
�z�g,u � @ s6 d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ ddl
mZ ddl
mZ ddl
mZ dd l
mZ dd
l
mZ g d�Ze�d��ej� d
ZG dd� dej�ZG dd� dej�ZdZdd� Zdd� Zdd� Zdd� ZG dd� de�Z dd� Z!G dd � d e�Z"G d!d"� d"e�Z#dS )#zBase class for api services.� N)�http_client)�urllib)�
message_types)�messages)�encoding)�
exceptions)�http_wrapper)�util)�
ApiMethodInfo�
ApiUploadInfo�
BaseApiClient�BaseApiService�NormalizeApiEndpointzoauth2client.utili c @ sP e Zd ZdZejddd�Ze�d�Ze�d�Z e�
d�Ze�d�Ze�
d �Z
d
S )r aT Media upload information for a method.
Fields:
accept: (repeated) MIME Media Ranges for acceptable media uploads
to this method.
max_size: (integer) Maximum size of a media upload, such as 3MB
or 1TB (converted to an integer).
resumable_path: Path to use for resumable uploads.
resumable_multipart: (boolean) Whether or not the resumable endpoint
supports multipart uploads.
simple_path: Path to use for simple uploads.
simple_multipart: (boolean) Whether or not the simple endpoint
supports multipart uploads.
� T��repeated� � � � � N)�__name__�
__module__�__qualname__�__doc__r �StringField�accept�IntegerField�max_sizeZresumable_path�BooleanFieldZresumable_multipartZsimple_pathZsimple_multipart� r r �=/opt/gsutil/third_party/apitools/apitools/base/py/base_api.pyr 5 s
r c @ s� e Zd ZdZe�d�Ze�d�Ze�d�Ze�d�Z ejddd�Z
ejd dd�Zejd
dd�Ze�d�Z
e�d�Ze�d
�Zejddd�Ze�ed�Zejddd�Ze�d�ZdS )r
a� Configuration info for an API method.
All fields are strings unless noted otherwise.
Fields:
relative_path: Relative path for this method.
flat_path: Expanded version (if any) of relative_path.
method_id: ID for this method.
http_method: HTTP verb to use for this method.
path_params: (repeated) path parameters for this method.
query_params: (repeated) query parameters for this method.
ordered_params: (repeated) ordered list of parameters for
this method.
description: description of this method.
request_type_name: name of the request type.
response_type_name: name of the response type.
request_field: if not null, the field to pass as the body
of this POST request. may also be the REQUEST_IS_BODY
value below to indicate the whole message is the body.
upload_config: (ApiUploadInfo) Information about the upload
configuration supported by this method.
supports_download: (boolean) If True, this method supports
downloading the request via the `alt=media` query
parameter.
api_version_param: API version system parameter for this
method.
r r r r r Tr r � � � �
� � )�default� �
F� N)r r r r r r �
relative_pathZ flat_path� method_id�http_method�path_params�query_paramsZordered_params�description�request_type_name�response_type_name�
request_field�MessageFieldr �
upload_configr Zsupports_download�api_version_paramr r r r! r
M s
r
z <request>c C sH | � d�r$| �d�\}}}tt|�S d| vr6t|| �S t�d| ��d S )Nzmessage_types.�.zUnknown class %s)�
startswith� partition�getattrr r �GeneratedClientError)�name�messages_module�_� classnamer r r! �
_LoadClass~ s
rA c C sJ |D ]@}|� � }t| d| �r(t| |�sd|t| �jf }t�|��qd S )Nz%sz'No %s specified for object of class %s.)�upper�hasattrr; �typer r r<