o
    ?Hh                     @  sh   d Z ddlmZ ddlZddlZddlZddlZddlm	Z	m
Z
 ddlmZmZmZ G dd deZdS )z
    LINE Messaging API

    This document describes LINE Messaging API.  # noqa: E501

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

    Do not edit the class manually.
    )annotationsN)OptionalUnion)	BaseModelField	StrictStrc                
   @  s   e Zd ZU dZedddZded< edddZded< ddgZG d	d
 d
Z	dZ
dddddddddd	Zed'ddZd(ddZd(ddZed)d!d"Zd#d$ Zed*d%d&ZdS )+Actionz[
    Action
    https://developers.line.biz/en/reference/messaging-api/#action-objects
    NzType of action)descriptionzOptional[StrictStr]typezLabel for the action.labelc                   @  s   e Zd ZdZdZdZdS )zAction.ConfigzPydantic configurationTN)__name__
__module____qualname____doc__allow_population_by_field_namevalidate_assignment r   r   b/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/linebot/v3/messaging/models/action.pyConfig#   s    r   CameraActionCameraRollActionClipboardActionDatetimePickerActionLocationActionMessageActionPostbackActionRichMenuSwitchAction	URIAction)	camera
cameraRoll	clipboarddatetimepickerlocationmessagepostbackrichmenuswitchuriobjdictreturnstrc                 C  s   || j  }|r| j|S dS )z9Returns the discriminator value (object type) of the dataN)$_Action__discriminator_property_name&_Action__discriminator_value_class_mapget)clsr'   discriminator_valuer   r   r   get_discriminator_value8   s   
zAction.get_discriminator_valuec                 C  s   t | jddS )z:Returns the string representation of the model using aliasT)by_alias)pprintpformatr(   selfr   r   r   to_strA   s   zAction.to_strc                 C  s   t |  S )z8Returns the JSON representation of the model using alias)jsondumpsto_dictr4   r   r   r   to_jsonE   s   zAction.to_jsonjson_strUnion(CameraAction, CameraRollAction, ClipboardAction, DatetimePickerAction, LocationAction, MessageAction, PostbackAction, RichMenuSwitchAction, URIAction)c                 C  s   |  t|S )z/Create an instance of Action from a JSON string)	from_dictr7   loads)r.   r;   r   r   r   	from_jsonI   s   zAction.from_jsonc                 C  s   | j di dd}|S )z>Returns the dictionary representation of the model using aliasT)r1   excludeexclude_none)r(   )r5   _dictr   r   r   r9   N   s
   zAction.to_dictc                 C  sT   |  |}|rttjjj|}||S tdt	| d | j
 d t	| j )z(Create an instance of Action from a dictz1Action failed to lookup discriminator value from z. Discriminator property name: z, mapping: )r0   getattrlinebotv3	messagingmodelsr=   
ValueErrorr7   r8   r+   r,   )r.   r'   object_typeklassr   r   r   r=   V   s   


zAction.from_dict)r'   r(   r)   r*   )r)   r*   )r;   r*   r)   r<   )r'   r(   r)   r<   )r   r   r   r   r   r
   __annotations__r   _Action__propertiesr   r+   r,   classmethodr0   r6   r:   r?   r9   r=   r   r   r   r   r      s4   
 

r   )r   
__future__r   r2   rer7   linebot.v3.messaging.modelsrD   typingr   r   pydantic.v1r   r   r   r   r   r   r   r   <module>   s   