# coding: utf-8

"""
    YouTube Data API v3

    The YouTube Data API v3 is an API that provides access to YouTube data, such as videos, playlists, and channels.

    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 List, Optional
from typing_extensions import Annotated
from youtube_ti.models.channel import Channel
from youtube_ti.models.channel_list_response import ChannelListResponse

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


class ChannelsApi:
    """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 youtube_channels_list(
        self,
        part: Annotated[List[StrictStr], Field(description="The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties.")],
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = 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,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = 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,
        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,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        category_id: Annotated[Optional[StrictStr], Field(description="Return the channels within the specified guide category ID.")] = None,
        for_handle: Annotated[Optional[StrictStr], Field(description="Return the channel associated with a YouTube handle.")] = None,
        for_username: Annotated[Optional[StrictStr], Field(description="Return the channel associated with a YouTube username.")] = None,
        hl: Annotated[Optional[StrictStr], Field(description="Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).")] = None,
        id: Annotated[Optional[List[StrictStr]], Field(description="Return the channels with the specified IDs.")] = None,
        managed_by_me: Annotated[Optional[StrictBool], Field(description="Return the channels managed by the authenticated user.")] = None,
        max_results: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=0)]], Field(description="The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.")] = None,
        mine: Annotated[Optional[StrictBool], Field(description="Return the ids of channels owned by the authenticated user.")] = None,
        my_subscribers: Annotated[Optional[StrictBool], Field(description="Return the channels subscribed to the authenticated user")] = None,
        on_behalf_of_content_owner: Annotated[Optional[StrictStr], Field(description="*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.")] = 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,
    ) -> ChannelListResponse:
        """youtube_channels_list

        Retrieves a list of resources, possibly filtered.

        :param part: The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties. (required)
        :type part: List[str]
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: 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 upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :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 param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param category_id: Return the channels within the specified guide category ID.
        :type category_id: str
        :param for_handle: Return the channel associated with a YouTube handle.
        :type for_handle: str
        :param for_username: Return the channel associated with a YouTube username.
        :type for_username: str
        :param hl: Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).
        :type hl: str
        :param id: Return the channels with the specified IDs.
        :type id: List[str]
        :param managed_by_me: Return the channels managed by the authenticated user.
        :type managed_by_me: bool
        :param max_results: The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
        :type max_results: int
        :param mine: Return the ids of channels owned by the authenticated user.
        :type mine: bool
        :param my_subscribers: Return the channels subscribed to the authenticated user
        :type my_subscribers: bool
        :param on_behalf_of_content_owner: *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
        :type on_behalf_of_content_owner: str
        :param page_token: The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
        :type page_token: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_channels_list_serialize(
            part=part,
            oauth_token=oauth_token,
            key=key,
            upload_type=upload_type,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            param_callback=param_callback,
            fields=fields,
            xgafv=xgafv,
            pretty_print=pretty_print,
            access_token=access_token,
            alt=alt,
            category_id=category_id,
            for_handle=for_handle,
            for_username=for_username,
            hl=hl,
            id=id,
            managed_by_me=managed_by_me,
            max_results=max_results,
            mine=mine,
            my_subscribers=my_subscribers,
            on_behalf_of_content_owner=on_behalf_of_content_owner,
            page_token=page_token,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChannelListResponse",
        }
        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 youtube_channels_list_with_http_info(
        self,
        part: Annotated[List[StrictStr], Field(description="The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties.")],
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = 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,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = 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,
        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,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        category_id: Annotated[Optional[StrictStr], Field(description="Return the channels within the specified guide category ID.")] = None,
        for_handle: Annotated[Optional[StrictStr], Field(description="Return the channel associated with a YouTube handle.")] = None,
        for_username: Annotated[Optional[StrictStr], Field(description="Return the channel associated with a YouTube username.")] = None,
        hl: Annotated[Optional[StrictStr], Field(description="Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).")] = None,
        id: Annotated[Optional[List[StrictStr]], Field(description="Return the channels with the specified IDs.")] = None,
        managed_by_me: Annotated[Optional[StrictBool], Field(description="Return the channels managed by the authenticated user.")] = None,
        max_results: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=0)]], Field(description="The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.")] = None,
        mine: Annotated[Optional[StrictBool], Field(description="Return the ids of channels owned by the authenticated user.")] = None,
        my_subscribers: Annotated[Optional[StrictBool], Field(description="Return the channels subscribed to the authenticated user")] = None,
        on_behalf_of_content_owner: Annotated[Optional[StrictStr], Field(description="*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.")] = 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[ChannelListResponse]:
        """youtube_channels_list

        Retrieves a list of resources, possibly filtered.

        :param part: The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties. (required)
        :type part: List[str]
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: 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 upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :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 param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param category_id: Return the channels within the specified guide category ID.
        :type category_id: str
        :param for_handle: Return the channel associated with a YouTube handle.
        :type for_handle: str
        :param for_username: Return the channel associated with a YouTube username.
        :type for_username: str
        :param hl: Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).
        :type hl: str
        :param id: Return the channels with the specified IDs.
        :type id: List[str]
        :param managed_by_me: Return the channels managed by the authenticated user.
        :type managed_by_me: bool
        :param max_results: The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
        :type max_results: int
        :param mine: Return the ids of channels owned by the authenticated user.
        :type mine: bool
        :param my_subscribers: Return the channels subscribed to the authenticated user
        :type my_subscribers: bool
        :param on_behalf_of_content_owner: *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
        :type on_behalf_of_content_owner: str
        :param page_token: The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
        :type page_token: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_channels_list_serialize(
            part=part,
            oauth_token=oauth_token,
            key=key,
            upload_type=upload_type,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            param_callback=param_callback,
            fields=fields,
            xgafv=xgafv,
            pretty_print=pretty_print,
            access_token=access_token,
            alt=alt,
            category_id=category_id,
            for_handle=for_handle,
            for_username=for_username,
            hl=hl,
            id=id,
            managed_by_me=managed_by_me,
            max_results=max_results,
            mine=mine,
            my_subscribers=my_subscribers,
            on_behalf_of_content_owner=on_behalf_of_content_owner,
            page_token=page_token,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ChannelListResponse",
        }
        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 youtube_channels_list_without_preload_content(
        self,
        part: Annotated[List[StrictStr], Field(description="The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties.")],
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = 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,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = 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,
        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,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        category_id: Annotated[Optional[StrictStr], Field(description="Return the channels within the specified guide category ID.")] = None,
        for_handle: Annotated[Optional[StrictStr], Field(description="Return the channel associated with a YouTube handle.")] = None,
        for_username: Annotated[Optional[StrictStr], Field(description="Return the channel associated with a YouTube username.")] = None,
        hl: Annotated[Optional[StrictStr], Field(description="Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).")] = None,
        id: Annotated[Optional[List[StrictStr]], Field(description="Return the channels with the specified IDs.")] = None,
        managed_by_me: Annotated[Optional[StrictBool], Field(description="Return the channels managed by the authenticated user.")] = None,
        max_results: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=0)]], Field(description="The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.")] = None,
        mine: Annotated[Optional[StrictBool], Field(description="Return the ids of channels owned by the authenticated user.")] = None,
        my_subscribers: Annotated[Optional[StrictBool], Field(description="Return the channels subscribed to the authenticated user")] = None,
        on_behalf_of_content_owner: Annotated[Optional[StrictStr], Field(description="*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.")] = 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:
        """youtube_channels_list

        Retrieves a list of resources, possibly filtered.

        :param part: The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties. (required)
        :type part: List[str]
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: 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 upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :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 param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param category_id: Return the channels within the specified guide category ID.
        :type category_id: str
        :param for_handle: Return the channel associated with a YouTube handle.
        :type for_handle: str
        :param for_username: Return the channel associated with a YouTube username.
        :type for_username: str
        :param hl: Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).
        :type hl: str
        :param id: Return the channels with the specified IDs.
        :type id: List[str]
        :param managed_by_me: Return the channels managed by the authenticated user.
        :type managed_by_me: bool
        :param max_results: The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.
        :type max_results: int
        :param mine: Return the ids of channels owned by the authenticated user.
        :type mine: bool
        :param my_subscribers: Return the channels subscribed to the authenticated user
        :type my_subscribers: bool
        :param on_behalf_of_content_owner: *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.
        :type on_behalf_of_content_owner: str
        :param page_token: The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
        :type page_token: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_channels_list_serialize(
            part=part,
            oauth_token=oauth_token,
            key=key,
            upload_type=upload_type,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            param_callback=param_callback,
            fields=fields,
            xgafv=xgafv,
            pretty_print=pretty_print,
            access_token=access_token,
            alt=alt,
            category_id=category_id,
            for_handle=for_handle,
            for_username=for_username,
            hl=hl,
            id=id,
            managed_by_me=managed_by_me,
            max_results=max_results,
            mine=mine,
            my_subscribers=my_subscribers,
            on_behalf_of_content_owner=on_behalf_of_content_owner,
            page_token=page_token,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _youtube_channels_list_serialize(
        self,
        part,
        oauth_token,
        key,
        upload_type,
        quota_user,
        upload_protocol,
        param_callback,
        fields,
        xgafv,
        pretty_print,
        access_token,
        alt,
        category_id,
        for_handle,
        for_username,
        hl,
        id,
        managed_by_me,
        max_results,
        mine,
        my_subscribers,
        on_behalf_of_content_owner,
        page_token,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
            'part': 'multi',
            'id': 'multi',
        }

        _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 oauth_token is not None:
            
            _query_params.append(('oauth_token', oauth_token))
            
        if key is not None:
            
            _query_params.append(('key', key))
            
        if upload_type is not None:
            
            _query_params.append(('uploadType', upload_type))
            
        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 param_callback is not None:
            
            _query_params.append(('callback', param_callback))
            
        if fields is not None:
            
            _query_params.append(('fields', fields))
            
        if xgafv is not None:
            
            _query_params.append(('$.xgafv', xgafv))
            
        if pretty_print is not None:
            
            _query_params.append(('prettyPrint', pretty_print))
            
        if access_token is not None:
            
            _query_params.append(('access_token', access_token))
            
        if alt is not None:
            
            _query_params.append(('alt', alt))
            
        if part is not None:
            
            _query_params.append(('part', part))
            
        if category_id is not None:
            
            _query_params.append(('categoryId', category_id))
            
        if for_handle is not None:
            
            _query_params.append(('forHandle', for_handle))
            
        if for_username is not None:
            
            _query_params.append(('forUsername', for_username))
            
        if hl is not None:
            
            _query_params.append(('hl', hl))
            
        if id is not None:
            
            _query_params.append(('id', id))
            
        if managed_by_me is not None:
            
            _query_params.append(('managedByMe', managed_by_me))
            
        if max_results is not None:
            
            _query_params.append(('maxResults', max_results))
            
        if mine is not None:
            
            _query_params.append(('mine', mine))
            
        if my_subscribers is not None:
            
            _query_params.append(('mySubscribers', my_subscribers))
            
        if on_behalf_of_content_owner is not None:
            
            _query_params.append(('onBehalfOfContentOwner', on_behalf_of_content_owner))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        # 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='/youtube/v3/channels',
            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 youtube_channels_update(
        self,
        part: Annotated[List[StrictStr], Field(description="The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.")],
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = 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,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = 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,
        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,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        on_behalf_of_content_owner: Annotated[Optional[StrictStr], Field(description="The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.")] = 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:
        """youtube_channels_update

        Updates an existing resource.

        :param part: The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. (required)
        :type part: List[str]
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: 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 upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :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 param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param on_behalf_of_content_owner: The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
        :type on_behalf_of_content_owner: str
        :param channel:
        :type channel: Channel
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_channels_update_serialize(
            part=part,
            oauth_token=oauth_token,
            key=key,
            upload_type=upload_type,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            param_callback=param_callback,
            fields=fields,
            xgafv=xgafv,
            pretty_print=pretty_print,
            access_token=access_token,
            alt=alt,
            on_behalf_of_content_owner=on_behalf_of_content_owner,
            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 youtube_channels_update_with_http_info(
        self,
        part: Annotated[List[StrictStr], Field(description="The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.")],
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = 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,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = 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,
        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,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        on_behalf_of_content_owner: Annotated[Optional[StrictStr], Field(description="The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.")] = 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]:
        """youtube_channels_update

        Updates an existing resource.

        :param part: The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. (required)
        :type part: List[str]
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: 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 upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :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 param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param on_behalf_of_content_owner: The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
        :type on_behalf_of_content_owner: str
        :param channel:
        :type channel: Channel
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_channels_update_serialize(
            part=part,
            oauth_token=oauth_token,
            key=key,
            upload_type=upload_type,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            param_callback=param_callback,
            fields=fields,
            xgafv=xgafv,
            pretty_print=pretty_print,
            access_token=access_token,
            alt=alt,
            on_behalf_of_content_owner=on_behalf_of_content_owner,
            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 youtube_channels_update_without_preload_content(
        self,
        part: Annotated[List[StrictStr], Field(description="The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.")],
        oauth_token: Annotated[Optional[StrictStr], Field(description="OAuth 2.0 token for the current user.")] = 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,
        upload_type: Annotated[Optional[StrictStr], Field(description="Legacy upload protocol for media (e.g. \"media\", \"multipart\").")] = 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,
        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,
        xgafv: Annotated[Optional[StrictStr], Field(description="V1 error format.")] = None,
        pretty_print: Annotated[Optional[StrictBool], Field(description="Returns response with indentations and line breaks.")] = None,
        access_token: Annotated[Optional[StrictStr], Field(description="OAuth access token.")] = None,
        alt: Annotated[Optional[StrictStr], Field(description="Data format for response.")] = None,
        on_behalf_of_content_owner: Annotated[Optional[StrictStr], Field(description="The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.")] = 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:
        """youtube_channels_update

        Updates an existing resource.

        :param part: The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. (required)
        :type part: List[str]
        :param oauth_token: OAuth 2.0 token for the current user.
        :type oauth_token: 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 upload_type: Legacy upload protocol for media (e.g. \"media\", \"multipart\").
        :type upload_type: str
        :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 param_callback: JSONP
        :type param_callback: str
        :param fields: Selector specifying which fields to include in a partial response.
        :type fields: str
        :param xgafv: V1 error format.
        :type xgafv: str
        :param pretty_print: Returns response with indentations and line breaks.
        :type pretty_print: bool
        :param access_token: OAuth access token.
        :type access_token: str
        :param alt: Data format for response.
        :type alt: str
        :param on_behalf_of_content_owner: The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
        :type on_behalf_of_content_owner: str
        :param channel:
        :type channel: Channel
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_channels_update_serialize(
            part=part,
            oauth_token=oauth_token,
            key=key,
            upload_type=upload_type,
            quota_user=quota_user,
            upload_protocol=upload_protocol,
            param_callback=param_callback,
            fields=fields,
            xgafv=xgafv,
            pretty_print=pretty_print,
            access_token=access_token,
            alt=alt,
            on_behalf_of_content_owner=on_behalf_of_content_owner,
            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 _youtube_channels_update_serialize(
        self,
        part,
        oauth_token,
        key,
        upload_type,
        quota_user,
        upload_protocol,
        param_callback,
        fields,
        xgafv,
        pretty_print,
        access_token,
        alt,
        on_behalf_of_content_owner,
        channel,
        request_auth__,
        content_type__,
        headers__,
        host__,
    ) -> RequestSerialized:


        _collection_formats: Dict[str, str] = {
            'part': 'multi',
        }

        _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 oauth_token is not None:
            
            _query_params.append(('oauth_token', oauth_token))
            
        if key is not None:
            
            _query_params.append(('key', key))
            
        if upload_type is not None:
            
            _query_params.append(('uploadType', upload_type))
            
        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 param_callback is not None:
            
            _query_params.append(('callback', param_callback))
            
        if fields is not None:
            
            _query_params.append(('fields', fields))
            
        if xgafv is not None:
            
            _query_params.append(('$.xgafv', xgafv))
            
        if pretty_print is not None:
            
            _query_params.append(('prettyPrint', pretty_print))
            
        if access_token is not None:
            
            _query_params.append(('access_token', access_token))
            
        if alt is not None:
            
            _query_params.append(('alt', alt))
            
        if part is not None:
            
            _query_params.append(('part', part))
            
        if on_behalf_of_content_owner is not None:
            
            _query_params.append(('onBehalfOfContentOwner', on_behalf_of_content_owner))
            
        # 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='PUT',
            resource_path='/youtube/v3/channels',
            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__
        )


