# coding: utf-8

"""
    Google Drive API

    The Google Drive API allows clients to access resources from Google Drive.

    The version of the OpenAPI document: v3
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictStr, field_validator
from typing import Optional
from typing_extensions import Annotated
from google_drive_ti.models.change_list import ChangeList
from google_drive_ti.models.channel import Channel
from google_drive_ti.models.start_page_token import StartPageToken

from google_drive_ti.api_client import ApiClient, RequestSerialized
from google_drive_ti.api_response import ApiResponse
from google_drive_ti.rest import RESTResponseType


class ChangesApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client


    @validate_call
    def drive_changes_get_start_page_token(
        self,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> StartPageToken:
        """drive_changes_get_start_page_token

        Gets the starting pageToken for listing future changes. For more information, see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-changes).

        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.
        :type drive_id: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_get_start_page_token_serialize(
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StartPageToken",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def drive_changes_get_start_page_token_with_http_info(
        self,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[StartPageToken]:
        """drive_changes_get_start_page_token

        Gets the starting pageToken for listing future changes. For more information, see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-changes).

        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.
        :type drive_id: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_get_start_page_token_serialize(
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StartPageToken",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def drive_changes_get_start_page_token_without_preload_content(
        self,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """drive_changes_get_start_page_token

        Gets the starting pageToken for listing future changes. For more information, see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-changes).

        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned.
        :type drive_id: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_get_start_page_token_serialize(
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StartPageToken",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _drive_changes_get_start_page_token_serialize(
        self,
        access_token,
        alt,
        param_callback,
        fields,
        key,
        oauth_token,
        pretty_print,
        quota_user,
        upload_protocol,
        upload_type,
        xgafv,
        drive_id,
        supports_all_drives,
        supports_team_drives,
        team_drive_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if access_token is not None:
            
            _query_params.append(('access_token', access_token))
            
        if alt is not None:
            
            _query_params.append(('alt', alt))
            
        if param_callback is not None:
            
            _query_params.append(('callback', param_callback))
            
        if fields is not None:
            
            _query_params.append(('fields', fields))
            
        if key is not None:
            
            _query_params.append(('key', key))
            
        if oauth_token is not None:
            
            _query_params.append(('oauth_token', oauth_token))
            
        if pretty_print is not None:
            
            _query_params.append(('prettyPrint', pretty_print))
            
        if quota_user is not None:
            
            _query_params.append(('quotaUser', quota_user))
            
        if upload_protocol is not None:
            
            _query_params.append(('upload_protocol', upload_protocol))
            
        if upload_type is not None:
            
            _query_params.append(('uploadType', upload_type))
            
        if xgafv is not None:
            
            _query_params.append(('$.xgafv', xgafv))
            
        if drive_id is not None:
            
            _query_params.append(('driveId', drive_id))
            
        if supports_all_drives is not None:
            
            _query_params.append(('supportsAllDrives', supports_all_drives))
            
        if supports_team_drives is not None:
            
            _query_params.append(('supportsTeamDrives', supports_team_drives))
            
        if team_drive_id is not None:
            
            _query_params.append(('teamDriveId', team_drive_id))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    '*/*'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'Oauth2c', 
            'Oauth2'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/changes/startPageToken',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def drive_changes_list(
        self,
        page_token: Annotated[StrictStr, Field(description="The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.")],
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.")] = None,
        include_corpus_removals: Annotated[Optional[StrictBool], Field(description="Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.")] = None,
        include_items_from_all_drives: Annotated[Optional[StrictBool], Field(description="Whether both My Drive and shared drive items should be included in results.")] = None,
        include_labels: Annotated[Optional[StrictStr], Field(description="A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.")] = None,
        include_permissions_for_view: Annotated[Optional[StrictStr], Field(description="Specifies which additional view's permissions to include in the response. Only 'published' is supported.")] = None,
        include_removed: Annotated[Optional[StrictBool], Field(description="Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.")] = None,
        include_team_drive_items: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `includeItemsFromAllDrives` instead.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The maximum number of changes to return per page.")] = None,
        restrict_to_my_drive: Annotated[Optional[StrictBool], Field(description="Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.")] = None,
        spaces: Annotated[Optional[StrictStr], Field(description="A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ChangeList:
        """drive_changes_list

        Lists the changes for a user or shared drive. For more information, see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-changes).

        :param page_token: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. (required)
        :type page_token: str
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
        :type drive_id: str
        :param include_corpus_removals: Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
        :type include_corpus_removals: bool
        :param include_items_from_all_drives: Whether both My Drive and shared drive items should be included in results.
        :type include_items_from_all_drives: bool
        :param include_labels: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
        :type include_labels: str
        :param include_permissions_for_view: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
        :type include_permissions_for_view: str
        :param include_removed: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
        :type include_removed: bool
        :param include_team_drive_items: Deprecated: Use `includeItemsFromAllDrives` instead.
        :type include_team_drive_items: bool
        :param page_size: The maximum number of changes to return per page.
        :type page_size: int
        :param restrict_to_my_drive: Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
        :type restrict_to_my_drive: bool
        :param spaces: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
        :type spaces: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_list_serialize(
            page_token=page_token,
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            include_corpus_removals=include_corpus_removals,
            include_items_from_all_drives=include_items_from_all_drives,
            include_labels=include_labels,
            include_permissions_for_view=include_permissions_for_view,
            include_removed=include_removed,
            include_team_drive_items=include_team_drive_items,
            page_size=page_size,
            restrict_to_my_drive=restrict_to_my_drive,
            spaces=spaces,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChangeList",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def drive_changes_list_with_http_info(
        self,
        page_token: Annotated[StrictStr, Field(description="The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.")],
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.")] = None,
        include_corpus_removals: Annotated[Optional[StrictBool], Field(description="Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.")] = None,
        include_items_from_all_drives: Annotated[Optional[StrictBool], Field(description="Whether both My Drive and shared drive items should be included in results.")] = None,
        include_labels: Annotated[Optional[StrictStr], Field(description="A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.")] = None,
        include_permissions_for_view: Annotated[Optional[StrictStr], Field(description="Specifies which additional view's permissions to include in the response. Only 'published' is supported.")] = None,
        include_removed: Annotated[Optional[StrictBool], Field(description="Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.")] = None,
        include_team_drive_items: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `includeItemsFromAllDrives` instead.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The maximum number of changes to return per page.")] = None,
        restrict_to_my_drive: Annotated[Optional[StrictBool], Field(description="Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.")] = None,
        spaces: Annotated[Optional[StrictStr], Field(description="A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[ChangeList]:
        """drive_changes_list

        Lists the changes for a user or shared drive. For more information, see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-changes).

        :param page_token: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. (required)
        :type page_token: str
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
        :type drive_id: str
        :param include_corpus_removals: Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
        :type include_corpus_removals: bool
        :param include_items_from_all_drives: Whether both My Drive and shared drive items should be included in results.
        :type include_items_from_all_drives: bool
        :param include_labels: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
        :type include_labels: str
        :param include_permissions_for_view: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
        :type include_permissions_for_view: str
        :param include_removed: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
        :type include_removed: bool
        :param include_team_drive_items: Deprecated: Use `includeItemsFromAllDrives` instead.
        :type include_team_drive_items: bool
        :param page_size: The maximum number of changes to return per page.
        :type page_size: int
        :param restrict_to_my_drive: Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
        :type restrict_to_my_drive: bool
        :param spaces: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
        :type spaces: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_list_serialize(
            page_token=page_token,
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            include_corpus_removals=include_corpus_removals,
            include_items_from_all_drives=include_items_from_all_drives,
            include_labels=include_labels,
            include_permissions_for_view=include_permissions_for_view,
            include_removed=include_removed,
            include_team_drive_items=include_team_drive_items,
            page_size=page_size,
            restrict_to_my_drive=restrict_to_my_drive,
            spaces=spaces,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChangeList",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def drive_changes_list_without_preload_content(
        self,
        page_token: Annotated[StrictStr, Field(description="The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.")],
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.")] = None,
        include_corpus_removals: Annotated[Optional[StrictBool], Field(description="Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.")] = None,
        include_items_from_all_drives: Annotated[Optional[StrictBool], Field(description="Whether both My Drive and shared drive items should be included in results.")] = None,
        include_labels: Annotated[Optional[StrictStr], Field(description="A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.")] = None,
        include_permissions_for_view: Annotated[Optional[StrictStr], Field(description="Specifies which additional view's permissions to include in the response. Only 'published' is supported.")] = None,
        include_removed: Annotated[Optional[StrictBool], Field(description="Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.")] = None,
        include_team_drive_items: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `includeItemsFromAllDrives` instead.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The maximum number of changes to return per page.")] = None,
        restrict_to_my_drive: Annotated[Optional[StrictBool], Field(description="Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.")] = None,
        spaces: Annotated[Optional[StrictStr], Field(description="A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """drive_changes_list

        Lists the changes for a user or shared drive. For more information, see [Retrieve changes](https://developers.google.com/drive/api/guides/manage-changes).

        :param page_token: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. (required)
        :type page_token: str
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
        :type drive_id: str
        :param include_corpus_removals: Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
        :type include_corpus_removals: bool
        :param include_items_from_all_drives: Whether both My Drive and shared drive items should be included in results.
        :type include_items_from_all_drives: bool
        :param include_labels: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
        :type include_labels: str
        :param include_permissions_for_view: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
        :type include_permissions_for_view: str
        :param include_removed: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
        :type include_removed: bool
        :param include_team_drive_items: Deprecated: Use `includeItemsFromAllDrives` instead.
        :type include_team_drive_items: bool
        :param page_size: The maximum number of changes to return per page.
        :type page_size: int
        :param restrict_to_my_drive: Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
        :type restrict_to_my_drive: bool
        :param spaces: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
        :type spaces: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_list_serialize(
            page_token=page_token,
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            include_corpus_removals=include_corpus_removals,
            include_items_from_all_drives=include_items_from_all_drives,
            include_labels=include_labels,
            include_permissions_for_view=include_permissions_for_view,
            include_removed=include_removed,
            include_team_drive_items=include_team_drive_items,
            page_size=page_size,
            restrict_to_my_drive=restrict_to_my_drive,
            spaces=spaces,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChangeList",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _drive_changes_list_serialize(
        self,
        page_token,
        access_token,
        alt,
        param_callback,
        fields,
        key,
        oauth_token,
        pretty_print,
        quota_user,
        upload_protocol,
        upload_type,
        xgafv,
        drive_id,
        include_corpus_removals,
        include_items_from_all_drives,
        include_labels,
        include_permissions_for_view,
        include_removed,
        include_team_drive_items,
        page_size,
        restrict_to_my_drive,
        spaces,
        supports_all_drives,
        supports_team_drives,
        team_drive_id,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if access_token is not None:
            
            _query_params.append(('access_token', access_token))
            
        if alt is not None:
            
            _query_params.append(('alt', alt))
            
        if param_callback is not None:
            
            _query_params.append(('callback', param_callback))
            
        if fields is not None:
            
            _query_params.append(('fields', fields))
            
        if key is not None:
            
            _query_params.append(('key', key))
            
        if oauth_token is not None:
            
            _query_params.append(('oauth_token', oauth_token))
            
        if pretty_print is not None:
            
            _query_params.append(('prettyPrint', pretty_print))
            
        if quota_user is not None:
            
            _query_params.append(('quotaUser', quota_user))
            
        if upload_protocol is not None:
            
            _query_params.append(('upload_protocol', upload_protocol))
            
        if upload_type is not None:
            
            _query_params.append(('uploadType', upload_type))
            
        if xgafv is not None:
            
            _query_params.append(('$.xgafv', xgafv))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if drive_id is not None:
            
            _query_params.append(('driveId', drive_id))
            
        if include_corpus_removals is not None:
            
            _query_params.append(('includeCorpusRemovals', include_corpus_removals))
            
        if include_items_from_all_drives is not None:
            
            _query_params.append(('includeItemsFromAllDrives', include_items_from_all_drives))
            
        if include_labels is not None:
            
            _query_params.append(('includeLabels', include_labels))
            
        if include_permissions_for_view is not None:
            
            _query_params.append(('includePermissionsForView', include_permissions_for_view))
            
        if include_removed is not None:
            
            _query_params.append(('includeRemoved', include_removed))
            
        if include_team_drive_items is not None:
            
            _query_params.append(('includeTeamDriveItems', include_team_drive_items))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if restrict_to_my_drive is not None:
            
            _query_params.append(('restrictToMyDrive', restrict_to_my_drive))
            
        if spaces is not None:
            
            _query_params.append(('spaces', spaces))
            
        if supports_all_drives is not None:
            
            _query_params.append(('supportsAllDrives', supports_all_drives))
            
        if supports_team_drives is not None:
            
            _query_params.append(('supportsTeamDrives', supports_team_drives))
            
        if team_drive_id is not None:
            
            _query_params.append(('teamDriveId', team_drive_id))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    '*/*'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'Oauth2c', 
            'Oauth2'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/changes',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )




    @validate_call
    def drive_changes_watch(
        self,
        page_token: Annotated[StrictStr, Field(description="The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.")],
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.")] = None,
        include_corpus_removals: Annotated[Optional[StrictBool], Field(description="Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.")] = None,
        include_items_from_all_drives: Annotated[Optional[StrictBool], Field(description="Whether both My Drive and shared drive items should be included in results.")] = None,
        include_labels: Annotated[Optional[StrictStr], Field(description="A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.")] = None,
        include_permissions_for_view: Annotated[Optional[StrictStr], Field(description="Specifies which additional view's permissions to include in the response. Only 'published' is supported.")] = None,
        include_removed: Annotated[Optional[StrictBool], Field(description="Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.")] = None,
        include_team_drive_items: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `includeItemsFromAllDrives` instead.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The maximum number of changes to return per page.")] = None,
        restrict_to_my_drive: Annotated[Optional[StrictBool], Field(description="Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.")] = None,
        spaces: Annotated[Optional[StrictStr], Field(description="A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        channel: Optional[Channel] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> Channel:
        """drive_changes_watch

        Subscribes to changes for a user. For more information, see [Notifications for resource changes](https://developers.google.com/drive/api/guides/push).

        :param page_token: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. (required)
        :type page_token: str
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
        :type drive_id: str
        :param include_corpus_removals: Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
        :type include_corpus_removals: bool
        :param include_items_from_all_drives: Whether both My Drive and shared drive items should be included in results.
        :type include_items_from_all_drives: bool
        :param include_labels: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
        :type include_labels: str
        :param include_permissions_for_view: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
        :type include_permissions_for_view: str
        :param include_removed: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
        :type include_removed: bool
        :param include_team_drive_items: Deprecated: Use `includeItemsFromAllDrives` instead.
        :type include_team_drive_items: bool
        :param page_size: The maximum number of changes to return per page.
        :type page_size: int
        :param restrict_to_my_drive: Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
        :type restrict_to_my_drive: bool
        :param spaces: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
        :type spaces: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :param channel:
        :type channel: Channel
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_watch_serialize(
            page_token=page_token,
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            include_corpus_removals=include_corpus_removals,
            include_items_from_all_drives=include_items_from_all_drives,
            include_labels=include_labels,
            include_permissions_for_view=include_permissions_for_view,
            include_removed=include_removed,
            include_team_drive_items=include_team_drive_items,
            page_size=page_size,
            restrict_to_my_drive=restrict_to_my_drive,
            spaces=spaces,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Channel",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data


    @validate_call
    def drive_changes_watch_with_http_info(
        self,
        page_token: Annotated[StrictStr, Field(description="The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.")],
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.")] = None,
        include_corpus_removals: Annotated[Optional[StrictBool], Field(description="Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.")] = None,
        include_items_from_all_drives: Annotated[Optional[StrictBool], Field(description="Whether both My Drive and shared drive items should be included in results.")] = None,
        include_labels: Annotated[Optional[StrictStr], Field(description="A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.")] = None,
        include_permissions_for_view: Annotated[Optional[StrictStr], Field(description="Specifies which additional view's permissions to include in the response. Only 'published' is supported.")] = None,
        include_removed: Annotated[Optional[StrictBool], Field(description="Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.")] = None,
        include_team_drive_items: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `includeItemsFromAllDrives` instead.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The maximum number of changes to return per page.")] = None,
        restrict_to_my_drive: Annotated[Optional[StrictBool], Field(description="Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.")] = None,
        spaces: Annotated[Optional[StrictStr], Field(description="A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        channel: Optional[Channel] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> ApiResponse[Channel]:
        """drive_changes_watch

        Subscribes to changes for a user. For more information, see [Notifications for resource changes](https://developers.google.com/drive/api/guides/push).

        :param page_token: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. (required)
        :type page_token: str
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
        :type drive_id: str
        :param include_corpus_removals: Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
        :type include_corpus_removals: bool
        :param include_items_from_all_drives: Whether both My Drive and shared drive items should be included in results.
        :type include_items_from_all_drives: bool
        :param include_labels: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
        :type include_labels: str
        :param include_permissions_for_view: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
        :type include_permissions_for_view: str
        :param include_removed: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
        :type include_removed: bool
        :param include_team_drive_items: Deprecated: Use `includeItemsFromAllDrives` instead.
        :type include_team_drive_items: bool
        :param page_size: The maximum number of changes to return per page.
        :type page_size: int
        :param restrict_to_my_drive: Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
        :type restrict_to_my_drive: bool
        :param spaces: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
        :type spaces: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :param channel:
        :type channel: Channel
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_watch_serialize(
            page_token=page_token,
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            include_corpus_removals=include_corpus_removals,
            include_items_from_all_drives=include_items_from_all_drives,
            include_labels=include_labels,
            include_permissions_for_view=include_permissions_for_view,
            include_removed=include_removed,
            include_team_drive_items=include_team_drive_items,
            page_size=page_size,
            restrict_to_my_drive=restrict_to_my_drive,
            spaces=spaces,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Channel",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )


    @validate_call
    def drive_changes_watch_without_preload_content(
        self,
        page_token: Annotated[StrictStr, Field(description="The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.")],
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        param_callback: Annotated[Optional[StrictStr], Field(description="JSONP")] = None,
        fields: Annotated[Optional[StrictStr], Field(description="Selector specifying which fields to include in a partial response.")] = None,
        key: Annotated[Optional[StrictStr], Field(description="API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.")] = None,
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        quota_user: Annotated[Optional[StrictStr], Field(description="Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.")] = None,
        upload_protocol: Annotated[Optional[StrictStr], Field(description="Upload protocol for media (e.g. \"raw\", \"multipart\").")] = None,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = None,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        drive_id: Annotated[Optional[StrictStr], Field(description="The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.")] = None,
        include_corpus_removals: Annotated[Optional[StrictBool], Field(description="Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.")] = None,
        include_items_from_all_drives: Annotated[Optional[StrictBool], Field(description="Whether both My Drive and shared drive items should be included in results.")] = None,
        include_labels: Annotated[Optional[StrictStr], Field(description="A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.")] = None,
        include_permissions_for_view: Annotated[Optional[StrictStr], Field(description="Specifies which additional view's permissions to include in the response. Only 'published' is supported.")] = None,
        include_removed: Annotated[Optional[StrictBool], Field(description="Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.")] = None,
        include_team_drive_items: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `includeItemsFromAllDrives` instead.")] = None,
        page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The maximum number of changes to return per page.")] = None,
        restrict_to_my_drive: Annotated[Optional[StrictBool], Field(description="Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.")] = None,
        spaces: Annotated[Optional[StrictStr], Field(description="A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.")] = None,
        supports_all_drives: Annotated[Optional[StrictBool], Field(description="Whether the requesting application supports both My Drives and shared drives.")] = None,
        supports_team_drives: Annotated[Optional[StrictBool], Field(description="Deprecated: Use `supportsAllDrives` instead.")] = None,
        team_drive_id: Annotated[Optional[StrictStr], Field(description="Deprecated: Use `driveId` instead.")] = None,
        channel: Optional[Channel] = None,
        request_timeout__: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        request_auth__: Optional[Dict[StrictStr, Any]] = None,
        content_type__: Optional[StrictStr] = None,
        headers__: Optional[Dict[StrictStr, Any]] = None,
        host__: Optional[StrictStr] = None,
    ) -> RESTResponseType:
        """drive_changes_watch

        Subscribes to changes for a user. For more information, see [Notifications for resource changes](https://developers.google.com/drive/api/guides/push).

        :param page_token: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. (required)
        :type page_token: str
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param key: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
        :type key: str
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param quota_user: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
        :type quota_user: str
        :param upload_protocol: Upload protocol for media (e.g. \"raw\", \"multipart\").
        :type upload_protocol: str
        :param upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param drive_id: The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.
        :type drive_id: str
        :param include_corpus_removals: Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
        :type include_corpus_removals: bool
        :param include_items_from_all_drives: Whether both My Drive and shared drive items should be included in results.
        :type include_items_from_all_drives: bool
        :param include_labels: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
        :type include_labels: str
        :param include_permissions_for_view: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
        :type include_permissions_for_view: str
        :param include_removed: Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
        :type include_removed: bool
        :param include_team_drive_items: Deprecated: Use `includeItemsFromAllDrives` instead.
        :type include_team_drive_items: bool
        :param page_size: The maximum number of changes to return per page.
        :type page_size: int
        :param restrict_to_my_drive: Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
        :type restrict_to_my_drive: bool
        :param spaces: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
        :type spaces: str
        :param supports_all_drives: Whether the requesting application supports both My Drives and shared drives.
        :type supports_all_drives: bool
        :param supports_team_drives: Deprecated: Use `supportsAllDrives` instead.
        :type supports_team_drives: bool
        :param team_drive_id: Deprecated: Use `driveId` instead.
        :type team_drive_id: str
        :param channel:
        :type channel: Channel
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._drive_changes_watch_serialize(
            page_token=page_token,
            access_token=access_token,
            alt=alt,
            param_callback=param_callback,
            fields=fields,
            key=key,
            oauth_token=oauth_token,
            pretty_print=pretty_print,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            upload_type=upload_type,
            xgafv=xgafv,
            drive_id=drive_id,
            include_corpus_removals=include_corpus_removals,
            include_items_from_all_drives=include_items_from_all_drives,
            include_labels=include_labels,
            include_permissions_for_view=include_permissions_for_view,
            include_removed=include_removed,
            include_team_drive_items=include_team_drive_items,
            page_size=page_size,
            restrict_to_my_drive=restrict_to_my_drive,
            spaces=spaces,
            supports_all_drives=supports_all_drives,
            supports_team_drives=supports_team_drives,
            team_drive_id=team_drive_id,
            channel=channel,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Channel",
        }
        response_data = self.api_client.call_api(
            *_param,
            request_timeout__=request_timeout__
        )
        return response_data.response


    def _drive_changes_watch_serialize(
        self,
        page_token,
        access_token,
        alt,
        param_callback,
        fields,
        key,
        oauth_token,
        pretty_print,
        quota_user,
        upload_protocol,
        upload_type,
        xgafv,
        drive_id,
        include_corpus_removals,
        include_items_from_all_drives,
        include_labels,
        include_permissions_for_view,
        include_removed,
        include_team_drive_items,
        page_size,
        restrict_to_my_drive,
        spaces,
        supports_all_drives,
        supports_team_drives,
        team_drive_id,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = headers__ or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if access_token is not None:
            
            _query_params.append(('access_token', access_token))
            
        if alt is not None:
            
            _query_params.append(('alt', alt))
            
        if param_callback is not None:
            
            _query_params.append(('callback', param_callback))
            
        if fields is not None:
            
            _query_params.append(('fields', fields))
            
        if key is not None:
            
            _query_params.append(('key', key))
            
        if oauth_token is not None:
            
            _query_params.append(('oauth_token', oauth_token))
            
        if pretty_print is not None:
            
            _query_params.append(('prettyPrint', pretty_print))
            
        if quota_user is not None:
            
            _query_params.append(('quotaUser', quota_user))
            
        if upload_protocol is not None:
            
            _query_params.append(('upload_protocol', upload_protocol))
            
        if upload_type is not None:
            
            _query_params.append(('uploadType', upload_type))
            
        if xgafv is not None:
            
            _query_params.append(('$.xgafv', xgafv))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if drive_id is not None:
            
            _query_params.append(('driveId', drive_id))
            
        if include_corpus_removals is not None:
            
            _query_params.append(('includeCorpusRemovals', include_corpus_removals))
            
        if include_items_from_all_drives is not None:
            
            _query_params.append(('includeItemsFromAllDrives', include_items_from_all_drives))
            
        if include_labels is not None:
            
            _query_params.append(('includeLabels', include_labels))
            
        if include_permissions_for_view is not None:
            
            _query_params.append(('includePermissionsForView', include_permissions_for_view))
            
        if include_removed is not None:
            
            _query_params.append(('includeRemoved', include_removed))
            
        if include_team_drive_items is not None:
            
            _query_params.append(('includeTeamDriveItems', include_team_drive_items))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if restrict_to_my_drive is not None:
            
            _query_params.append(('restrictToMyDrive', restrict_to_my_drive))
            
        if spaces is not None:
            
            _query_params.append(('spaces', spaces))
            
        if supports_all_drives is not None:
            
            _query_params.append(('supportsAllDrives', supports_all_drives))
            
        if supports_team_drives is not None:
            
            _query_params.append(('supportsTeamDrives', supports_team_drives))
            
        if team_drive_id is not None:
            
            _query_params.append(('teamDriveId', team_drive_id))
            
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if channel is not None:
            _body_params = channel


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    '*/*'
                ]
            )

        # set the HTTP header `Content-Type`
        if content_type__:
            _header_params['Content-Type'] = content_type__
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'Oauth2c', 
            'Oauth2'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/changes/watch',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            host__=host__,
            request_auth__=request_auth__
        )


