o
    #`^hm                     @   s   d Z ddlZddlZddlmZmZ ddlmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZ G dd deZdS )z
    LIFF server API

    LIFF Server API.  # noqa: E501

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

    Do not edit the class manually.
    N)validate_argumentsValidationError)	Annotated)Field	StrictStr)AddLiffAppRequest)AddLiffAppResponse)GetAllLiffAppsResponse)UpdateLiffAppRequest)	ApiClient)ApiResponse)ApiTypeErrorApiValueErrorc                   @   sJ  e Zd ZdZd,ddZededefddZedede	fd	d
Z
edeeedddf ddfddZedeeedddf de	fddZedefddZede	fddZedeeedddf deddfddZedeeedddf dede	fddZdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ ZdS )-LiffzNOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    Nc                 C   s    |d u rt  }|| _d| _d S )Nzhttps://api.line.me)r   get_default
api_clientline_base_path)selfr    r   V/home/air/shanriGPT/back/venv/lib/python3.10/site-packages/linebot/v3/liff/api/liff.py__init__+   s   
zLiff.__init__add_liff_app_requestreturnc                 K   *   d|d< d|v rt d| j|fi |S )a  Create LIFF app  # noqa: E501

        Adding the LIFF app to a channel  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.add_liff_app(add_liff_app_request, async_req=True)
        >>> result = thread.get()

        :param add_liff_app_request: (required)
        :type add_liff_app_request: AddLiffAppRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: AddLiffAppResponse
        T_return_http_data_only_preload_contentzError! Please call the add_liff_app_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data)
ValueErroradd_liff_app_with_http_info)r   r   kwargsr   r   r   add_liff_app2      zLiff.add_liff_appc                 K   s(  | j }t }dg}|g d |d  D ]\}}||vr$td| |||< q|d= i }i }	g }
t|di }g }i }d}|d durJ|d }| jdg|d< |d	| j	dg}|rd||d
< dg}dddd}| jj
dd|	|
|||||||d|d|dd|d|||ddS )a  Create LIFF app  # noqa: E501

        Adding the LIFF app to a channel  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.add_liff_app_with_http_info(add_liff_app_request, async_req=True)
        >>> result = thread.get()

        :param add_liff_app_request: (required)
        :type add_liff_app_request: AddLiffAppRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(AddLiffAppResponse, status_code(int), headers(HTTPHeaderDict))
        r   	async_reqr   r   _request_timeout_request_auth_content_type_headersr   z>Got an unexpected keyword argument '%s' to method add_liff_appr&   Napplication/jsonAcceptr%   Content-TypeBearerr   )200400401/liff/v1/appsPOSTr"   r   r   Tr#   r$   bodypost_paramsfilesresponse_types_mapauth_settingsr"   r   r   r#   _hostcollection_formatsr$   )r   localsextenditemsr   dictgetr   select_header_acceptselect_header_content_typecall_api)r   r   r   r6   _params_all_params_key_val_collection_formats_path_params_query_params_header_params_form_params_files_body_params_content_types_list_auth_settings_response_types_mapr   r   r   r   O   st   &

z Liff.add_liff_app_with_http_infoliff_id.z ID of the LIFF app to be updated)descriptionc                 K   r   )a  Delete LIFF app from a channel  # noqa: E501

        Deletes a LIFF app from a channel.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_liff_app(liff_id, async_req=True)
        >>> result = thread.get()

        :param liff_id: ID of the LIFF app to be updated (required)
        :type liff_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        Tr   r   zError! Please call the delete_liff_app_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data)r   delete_liff_app_with_http_info)r   rN   r   r   r   r   delete_liff_app   r    zLiff.delete_liff_appc                 K   s   | j }t }dg}|g d |d  D ]\}}||vr$td| |||< q|d= i }i }	|d r:|d |	d< g }
t|di }g }i }d}dg}i }| jjd	d
|	|
|||||||d|d|dd|d|||ddS )as  Delete LIFF app from a channel  # noqa: E501

        Deletes a LIFF app from a channel.   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_liff_app_with_http_info(liff_id, async_req=True)
        >>> result = thread.get()

        :param liff_id: ID of the LIFF app to be updated (required)
        :type liff_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        rN   r!   r   zAGot an unexpected keyword argument '%s' to method delete_liff_appliffIdr&   Nr*   /liff/v1/apps/{liffId}DELETEr"   r   r   Tr#   r$   r0   )	r   r8   r9   r:   r   r;   r<   r   r?   )r   rN   r   r6   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rL   rM   r   r   r   rP      sZ   &

z#Liff.delete_liff_app_with_http_infoc                 K   s(   d|d< d|v rt d| jdi |S )a  Get all LIFF apps  # noqa: E501

        Gets information on all the LIFF apps added to the channel.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_all_liff_apps(async_req=True)
        >>> result = thread.get()

        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: GetAllLiffAppsResponse
        Tr   r   zError! Please call the get_all_liff_apps_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_dataNr   )r    get_all_liff_apps_with_http_info)r   r   r   r   r   get_all_liff_appsO  s   zLiff.get_all_liff_appsc                 K   s   | j }t }g }|g d |d  D ]\}}||vr#td| |||< q|d= i }i }g }	t|di }
g }i }d}| jdg|
d< dg}d	ddd
}| jj	dd||	|
||||||d|d|dd|d|||ddS )a\  Get all LIFF apps  # noqa: E501

        Gets information on all the LIFF apps added to the channel.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_all_liff_apps_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(GetAllLiffAppsResponse, status_code(int), headers(HTTPHeaderDict))
        r!   r   zCGot an unexpected keyword argument '%s' to method get_all_liff_appsr&   Nr'   r(   r*   r	   )r+   r-   404r.   GETr"   r   r   Tr#   r$   r0   )
r   r8   r9   r:   r   r;   r<   r   r=   r?   )r   r   r6   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rL   rM   r   r   r   rU   j  s`   $

z%Liff.get_all_liff_apps_with_http_infoupdate_liff_app_requestc                 K   s,   d|d< d|v rt d| j||fi |S )ar  Update LIFF app from a channel  # noqa: E501

        Update LIFF app settings  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.update_liff_app(liff_id, update_liff_app_request, async_req=True)
        >>> result = thread.get()

        :param liff_id: ID of the LIFF app to be updated (required)
        :type liff_id: str
        :param update_liff_app_request: (required)
        :type update_liff_app_request: UpdateLiffAppRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        Tr   r   zError! Please call the update_liff_app_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data)r   update_liff_app_with_http_info)r   rN   rY   r   r   r   r   update_liff_app  s   zLiff.update_liff_appc                 K   s$  | j }t }ddg}|g d |d  D ]\}}||vr%td| |||< q|d= i }	i }
|d r;|d |
d< g }t|di }g }i }d}|d durU|d }|d	| jd
g}|rf||d< dg}i }| jj	dd|
||||||||d|d|dd|d||	|ddS )a  Update LIFF app from a channel  # noqa: E501

        Update LIFF app settings  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.update_liff_app_with_http_info(liff_id, update_liff_app_request, async_req=True)
        >>> result = thread.get()

        :param liff_id: ID of the LIFF app to be updated (required)
        :type liff_id: str
        :param update_liff_app_request: (required)
        :type update_liff_app_request: UpdateLiffAppRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: None
        rN   rY   r!   r   zAGot an unexpected keyword argument '%s' to method update_liff_apprR   r&   Nr%   r'   r)   r*   rS   PUTr"   r   r   Tr#   r$   r0   )
r   r8   r9   r:   r   r;   r<   r   r>   r?   )r   rN   rY   r   r6   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   r   r   r   rZ     sn   (

z#Liff.update_liff_app_with_http_infoc                 O   $   dd l }|dt | j|i |S )Nr   z?liff_v1_apps_get was deprecated. use get_all_liff_apps instead.)warningswarnDeprecationWarningrV   r   argsr   r^   r   r   r   liff_v1_apps_getn     zLiff.liff_v1_apps_getc                 O   r]   )Nr   z]liff_v1_apps_get_with_http_info was deprecated. use get_all_liff_apps_with_http_info instead.)r^   r_   r`   rU   ra   r   r   r   liff_v1_apps_get_with_http_infos  rd   z$Liff.liff_v1_apps_get_with_http_infoc                 O   r]   )Nr   z;liff_v1_apps_post was deprecated. use add_liff_app instead.)r^   r_   r`   r   ra   r   r   r   liff_v1_apps_postx  rd   zLiff.liff_v1_apps_postc                 O   r]   )Nr   zYliff_v1_apps_post_with_http_info was deprecated. use add_liff_app_with_http_info instead.)r^   r_   r`   r   ra   r   r   r    liff_v1_apps_post_with_http_info}  rd   z%Liff.liff_v1_apps_post_with_http_infoc                 O   r]   )Nr   zEliff_v1_apps_liff_id_put was deprecated. use update_liff_app instead.)r^   r_   r`   r[   ra   r   r   r   liff_v1_apps_liff_id_put  rd   zLiff.liff_v1_apps_liff_id_putc                 O   r]   )Nr   zcliff_v1_apps_liff_id_put_with_http_info was deprecated. use update_liff_app_with_http_info instead.)r^   r_   r`   rZ   ra   r   r   r   'liff_v1_apps_liff_id_put_with_http_info  rd   z,Liff.liff_v1_apps_liff_id_put_with_http_infoc                 O   r]   )Nr   zHliff_v1_apps_liff_id_delete was deprecated. use delete_liff_app instead.)r^   r_   r`   rQ   ra   r   r   r   liff_v1_apps_liff_id_delete  rd   z Liff.liff_v1_apps_liff_id_deletec                 O   r]   )Nr   zfliff_v1_apps_liff_id_delete_with_http_info was deprecated. use delete_liff_app_with_http_info instead.)r^   r_   r`   rP   ra   r   r   r   *liff_v1_apps_liff_id_delete_with_http_info  rd   z/Liff.liff_v1_apps_liff_id_delete_with_http_info)N)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r   r   rQ   rP   r	   rV   rU   r
   r[   rZ   rc   re   rf   rg   rh   ri   rj   rk   r   r   r   r   r   $   s6    
x$$ik((xr   )ro   reiopydantic.v1r   r   typing_extensionsr   r   r   +linebot.v3.liff.models.add_liff_app_requestr   ,linebot.v3.liff.models.add_liff_app_responser   1linebot.v3.liff.models.get_all_liff_apps_responser	   .linebot.v3.liff.models.update_liff_app_requestr
   linebot.v3.liff.api_clientr   linebot.v3.liff.api_responser   linebot.v3.liff.exceptionsr   r   objectr   r   r   r   r   <module>   s   