# Path: google/_async_resumable_media/_upload.py
# class UploadBase(object):
# class SimpleUpload(UploadBase):
# class MultipartUpload(UploadBase):
# class ResumableUpload(UploadBase, sync_upload.ResumableUpload):
#     def __init__(self, upload_url, headers=None):
#     def finished(self):
#     def _process_response(self, response):
#     def _get_status_code(response):
#     def _get_headers(response):
#     def _get_body(response):
#     def _prepare_request(self, data, content_type):
#     def transmit(self, transport, data, content_type, timeout=None):
#     def __init__(self, upload_url, headers=None, checksum=None):
#     def _prepare_request(self, data, metadata, content_type):
#     def transmit(self, transport, data, metadata, content_type, timeout=None):
#     def __init__(self, upload_url, chunk_size, checksum=None, headers=None):
#     def invalid(self):
#     def chunk_size(self):
#     def resumable_url(self):
#     def bytes_uploaded(self):
#     def total_bytes(self):
#     def _prepare_initiate_request(
#         self, stream, metadata, content_type, total_bytes=None, stream_final=True
#     ):
#     def _process_initiate_response(self, response):
#     def initiate(
#         self,
#         transport,
#         stream,
#         metadata,
#         content_type,
#         total_bytes=None,
#         stream_final=True,
#         timeout=None,
#     ):
#     def _prepare_request(self):
#     def _make_invalid(self):
#     async def _process_resumable_response(self, response, bytes_sent):
#     async def _validate_checksum(self, response):
#     def transmit_next_chunk(self, transport, timeout=None):
#     def _prepare_recover_request(self):
#     def _process_recover_response(self, response):
#     def recover(self, transport):
# def get_boundary():
# def construct_multipart_request(data, metadata, content_type):
# def get_total_bytes(stream):
# def get_next_chunk(stream, chunk_size, total_bytes):
# def get_content_range(start_byte, end_byte, total_bytes):
# 
# Path: google/_async_resumable_media/requests/_request_helpers.py
# _DEFAULT_RETRY_STRATEGY = common.RetryStrategy()
# _SINGLE_GET_CHUNK_SIZE = 8192
# _DEFAULT_CONNECT_TIMEOUT = 61
# _DEFAULT_READ_TIMEOUT = 60
# _DEFAULT_TIMEOUT = aiohttp.ClientTimeout(
#     connect=_DEFAULT_CONNECT_TIMEOUT, sock_read=_DEFAULT_READ_TIMEOUT
# )
# class RequestsMixin(object):
# class RawRequestsMixin(RequestsMixin):
#     def _get_status_code(response):
#     def _get_headers(response):
#     async def _get_body(response):
#     async def _get_body(response):
# async def http_request(
#     transport,
#     method,
#     url,
#     data=None,
#     headers=None,
#     retry_strategy=_DEFAULT_RETRY_STRATEGY,
#     **transport_kwargs
# ):


from google._async_resumable_media import _upload
from google._async_resumable_media.requests import _request_helpers
        Args:
            transport (~requests.Session): A ``requests`` object which can
                make authenticated requests.
            data (bytes): The resource content to be uploaded.
            content_type (str): The content type of the resource, e.g. a JPEG
                image has content type ``image/jpeg``.
            timeout (Optional[Union[float, aiohttp.ClientTimeout]]):
                The number of seconds to wait for the server response.
                Depending on the retry strategy, a request may be repeated
                several times using the same timeout each time.
                Can also be passed as an `aiohttp.ClientTimeout` object.

        Returns:
            ~requests.Response: The HTTP response returned by ``transport``.
        """
        method, url, payload, headers = self._prepare_request(data, content_type)

        response = await _request_helpers.http_request(
            transport,
            method,
            url,
            data=payload,
            headers=headers,
            retry_strategy=self._retry_strategy,
            timeout=timeout,
        )
        self._process_response(response)
        return response



# Path: google/_async_resumable_media/_upload.py
# class UploadBase(object):
# class SimpleUpload(UploadBase):
# class MultipartUpload(UploadBase):
# class ResumableUpload(UploadBase, sync_upload.ResumableUpload):
#     def __init__(self, upload_url, headers=None):
#     def finished(self):
#     def _process_response(self, response):
#     def _get_status_code(response):
#     def _get_headers(response):
#     def _get_body(response):
#     def _prepare_request(self, data, content_type):
#     def transmit(self, transport, data, content_type, timeout=None):
#     def __init__(self, upload_url, headers=None, checksum=None):
#     def _prepare_request(self, data, metadata, content_type):
#     def transmit(self, transport, data, metadata, content_type, timeout=None):
#     def __init__(self, upload_url, chunk_size, checksum=None, headers=None):
#     def invalid(self):
#     def chunk_size(self):
#     def resumable_url(self):
#     def bytes_uploaded(self):
#     def total_bytes(self):
#     def _prepare_initiate_request(
#         self, stream, metadata, content_type, total_bytes=None, stream_final=True
#     ):
#     def _process_initiate_response(self, response):
#     def initiate(
#         self,
#         transport,
#         stream,
#         metadata,
#         content_type,
#         total_bytes=None,
#         stream_final=True,
#         timeout=None,
#     ):
#     def _prepare_request(self):
#     def _make_invalid(self):
#     async def _process_resumable_response(self, response, bytes_sent):
#     async def _validate_checksum(self, response):
#     def transmit_next_chunk(self, transport, timeout=None):
#     def _prepare_recover_request(self):
#     def _process_recover_response(self, response):
#     def recover(self, transport):
# def get_boundary():
# def construct_multipart_request(data, metadata, content_type):
# def get_total_bytes(stream):
# def get_next_chunk(stream, chunk_size, total_bytes):
# def get_content_range(start_byte, end_byte, total_bytes):
# 
# Path: google/_async_resumable_media/requests/_request_helpers.py
# _DEFAULT_RETRY_STRATEGY = common.RetryStrategy()
# _SINGLE_GET_CHUNK_SIZE = 8192
# _DEFAULT_CONNECT_TIMEOUT = 61
# _DEFAULT_READ_TIMEOUT = 60
# _DEFAULT_TIMEOUT = aiohttp.ClientTimeout(
#     connect=_DEFAULT_CONNECT_TIMEOUT, sock_read=_DEFAULT_READ_TIMEOUT
# )
# class RequestsMixin(object):
# class RawRequestsMixin(RequestsMixin):
#     def _get_status_code(response):
#     def _get_headers(response):
#     async def _get_body(response):
#     async def _get_body(response):
# async def http_request(
#     transport,
#     method,
#     url,
#     data=None,
#     headers=None,
#     retry_strategy=_DEFAULT_RETRY_STRATEGY,
#     **transport_kwargs
# ):


# Path: google/_async_resumable_media/requests/upload.py
from google._async_resumable_media import _upload
from google._async_resumable_media.requests import _request_helpers

        Args:
            transport (~requests.Session): A ``requests`` object which can
                make authenticated requests.
            data (bytes): The resource content to be uploaded.
            content_type (str): The content type of the resource, e.g. a JPEG
                image has content type ``image/jpeg``.
            timeout (Optional[Union[float, aiohttp.ClientTimeout]]):
                The number of seconds to wait for the server response.
                Depending on the retry strategy, a request may be repeated
                several times using the same timeout each time.
                Can also be passed as an `aiohttp.ClientTimeout` object.

        Returns:
            ~requests.Response: The HTTP response returned by ``transport``.
        """
        method, url, payload, headers = self._prepare_request(data, content_type)

        response = await _request_helpers.http_request(
            transport,
            method,
            url,
            data=payload,
            headers=headers,
            retry_strategy=self._retry_strategy,
            timeout=timeout,
        )
        self._process_response(response)
        return response



class MultipartUpload(_request_helpers.RequestsMixin, _upload.MultipartUpload):