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< dgZG dd dZdZ	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 )#	Recipientz
    Recipient
    NzType of recipient)descriptionzOptional[StrictStr]typec                   @  s   e Zd ZdZdZdZdS )zRecipient.ConfigzPydantic configurationTN)__name__
__module____qualname____doc__allow_population_by_field_namevalidate_assignment r   r   e/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/linebot/v3/messaging/models/recipient.pyConfig!   s    r   AudienceRecipientOperatorRecipientRedeliveryRecipient)audienceoperator
redeliveryobjdictreturnstrc                 C  s   || j  }|r| j|S dS )z9Returns the discriminator value (object type) of the dataN)'_Recipient__discriminator_property_name)_Recipient__discriminator_value_class_mapget)clsr   discriminator_valuer   r   r   get_discriminator_value0   s   
z!Recipient.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_str9   s   zRecipient.to_strc                 C  s   t |  S )z8Returns the JSON representation of the model using alias)jsondumpsto_dictr'   r   r   r   to_json=   s   zRecipient.to_jsonjson_str@Union(AudienceRecipient, OperatorRecipient, RedeliveryRecipient)c                 C  s   |  t|S )z2Create an instance of Recipient from a JSON string)	from_dictr*   loads)r!   r.   r   r   r   	from_jsonA   s   zRecipient.from_jsonc                 C  s   | j di dd}|S )z>Returns the dictionary representation of the model using aliasT)r$   excludeexclude_none)r   )r(   _dictr   r   r   r,   F   s
   zRecipient.to_dictc                 C  sT   |  |}|rttjjj|}||S tdt	| d | j
 d t	| j )z+Create an instance of Recipient from a dictz4Recipient failed to lookup discriminator value from z. Discriminator property name: z, mapping: )r#   getattrlinebotv3	messagingmodelsr0   
ValueErrorr*   r+   r   r   )r!   r   object_typeklassr   r   r   r0   N   s   


zRecipient.from_dict)r   r   r   r   )r   r   )r.   r   r   r/   )r   r   r   r/   )r   r   r   r   r   r
   __annotations___Recipient__propertiesr   r   r   classmethodr#   r)   r-   r2   r,   r0   r   r   r   r   r      s&   
 

r   )r   
__future__r   r%   rer*   linebot.v3.messaging.modelsr7   typingr   r   pydantic.v1r   r   r   r   r   r   r   r   <module>   s   