o
    ?Hh                     @  s   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mZ ddlmZ ddlmZ ddlmZ G d	d
 d
eZdS )z
    Webhook Type Definition

    Webhook event definition of the LINE Messaging 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.
    )annotationsN)OptionalUnion)	BaseModelField	StrictInt	StrictStr)DeliveryContext)	EventMode)Sourcec                   @  sT  e Zd ZU dZedddZded< dZded	< edd
dZded< edZ	ded< eddddZ
ded< edddZded< g dZG dd dZdZi ddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>ZedQdCdDZdRdEdFZdRdGdHZedSdKdLZdMdN ZedTdOdPZdS )UEventz
    Webhook event
    .zType of the event)descriptionr   typeNzOptional[Source]sourcez"Time of the event in milliseconds.r   	timestampr
   modewebhookEventIdzbWebhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.)aliasr   webhook_event_iddeliveryContext)r   r	   delivery_context)r   r   r   r   r   r   c                   @  s   e Zd ZdZdZdZdS )zEvent.ConfigzPydantic configurationTN)__name__
__module____qualname____doc__allow_population_by_field_namevalidate_assignment r   r   `/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/linebot/v3/webhooks/models/event.pyConfig)   s    r   accountLinkAccountLinkEvent	activatedActivatedEventbeaconBeaconEvent
botResumedBotResumedEventbotSuspendedBotSuspendedEventdeactivatedDeactivatedEventdeliveryPnpDeliveryCompletionEventfollowFollowEventjoin	JoinEventleave
LeaveEventmemberJoinedMemberJoinedEvent
memberLeftMemberLeftEventmessageMessageEventmoduleModuleEventpostbackPostbackEventthingsThingsEventunfollowUnfollowEventUnsendEventVideoPlayCompleteEvent)unsendvideoPlayCompleteobjdictreturnstrc                 C  s   || j  }|r| j|S dS )z9Returns the discriminator value (object type) of the dataN)#_Event__discriminator_property_name%_Event__discriminator_value_class_mapget)clsrF   discriminator_valuer   r   r   get_discriminator_valueH   s   
zEvent.get_discriminator_valuec                 C  s   t | jddS )z:Returns the string representation of the model using aliasT)by_alias)pprintpformatrG   selfr   r   r   to_strQ   s   zEvent.to_strc                 C  s   t |  S )z8Returns the JSON representation of the model using alias)jsondumpsto_dictrS   r   r   r   to_jsonU   s   zEvent.to_jsonjson_str9  Union(AccountLinkEvent, ActivatedEvent, BeaconEvent, BotResumedEvent, BotSuspendedEvent, DeactivatedEvent, FollowEvent, JoinEvent, LeaveEvent, MemberJoinedEvent, MemberLeftEvent, MessageEvent, ModuleEvent, PnpDeliveryCompletionEvent, PostbackEvent, ThingsEvent, UnfollowEvent, UnsendEvent, VideoPlayCompleteEvent)c                 C  s   |  t|S )z.Create an instance of Event from a JSON string)	from_dictrV   loads)rM   rZ   r   r   r   	from_jsonY   s   zEvent.from_jsonc                 C  s<   | j di dd}| jr| j |d< | jr| j |d< |S )z>Returns the dictionary representation of the model using aliasT)rP   excludeexclude_noner   r   )rG   r   rX   r   )rT   _dictr   r   r   rX   ^   s   zEvent.to_dictc                 C  sT   |  |}|rttjjj|}||S tdt	| d | j
 d t	| j )z'Create an instance of Event from a dictz0Event failed to lookup discriminator value from z. Discriminator property name: z, mapping: )rO   getattrlinebotv3webhooksmodelsr\   
ValueErrorrV   rW   rJ   rK   )rM   rF   object_typeklassr   r   r   r\   l   s   


zEvent.from_dict)rF   rG   rH   rI   )rH   rI   )rZ   rI   rH   r[   )rF   rG   rH   r[   )r   r   r   r   r   r   __annotations__r   r   r   r   r   _Event__propertiesr   rJ   rK   classmethodrO   rU   rY   r^   rX   r\   r   r   r   r   r      st   
 	


r   )r   
__future__r   rQ   rerV   linebot.v3.webhooks.modelsrc   typingr   r   pydantic.v1r   r   r   r   +linebot.v3.webhooks.models.delivery_contextr	   %linebot.v3.webhooks.models.event_moder
   !linebot.v3.webhooks.models.sourcer   r   r   r   r   r   <module>   s   