# 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 Optional
from typing_extensions import Annotated
from youtube_ti.models.video_trainability import VideoTrainability

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


class VideoTrainabilityApi:
    """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_video_trainability_get(
        self,
        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,
        id: Annotated[Optional[StrictStr], Field(description="The ID of the video to retrieve.")] = 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,
    ) -> VideoTrainability:
        """youtube_video_trainability_get

        Returns the trainability status of a video.

        :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 id: The ID of the video to retrieve.
        :type id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_video_trainability_get_serialize(
            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,
            id=id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "VideoTrainability",
        }
        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_video_trainability_get_with_http_info(
        self,
        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,
        id: Annotated[Optional[StrictStr], Field(description="The ID of the video to retrieve.")] = 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[VideoTrainability]:
        """youtube_video_trainability_get

        Returns the trainability status of a video.

        :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 id: The ID of the video to retrieve.
        :type id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_video_trainability_get_serialize(
            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,
            id=id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "VideoTrainability",
        }
        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_video_trainability_get_without_preload_content(
        self,
        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,
        id: Annotated[Optional[StrictStr], Field(description="The ID of the video to retrieve.")] = 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_video_trainability_get

        Returns the trainability status of a video.

        :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 id: The ID of the video to retrieve.
        :type id: str
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._youtube_video_trainability_get_serialize(
            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,
            id=id,
            request_auth__=request_auth__,
            content_type__=content_type__,
            headers__=headers__,
            host__=host__
        )

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


    def _youtube_video_trainability_get_serialize(
        self,
        oauth_token,
        key,
        upload_type,
        quota_user,
        upload_protocol,
        param_callback,
        fields,
        xgafv,
        pretty_print,
        access_token,
        alt,
        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 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 id is not None:
            
            _query_params.append(('id', 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='/youtube/v3/videoTrainability',
            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__
        )


