o
    ?Hh                     @  sx   d Z ddlmZ ddlZddlZddlZddlmZmZm	Z	 ddl
mZmZmZmZmZ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)ListOptionalUnion)	BaseModelField
StrictBoolStrictFloat	StrictInt	StrictStrconlist	validatorc                   @  sB  e Zd ZU dZeddddZded< eddd	Zd
ed< eddd	Zd
ed< eddd	Z	ded< eddd	Z
ded< eddd	Zd
ed< eddddZded< eddddZded< eddddZded < edd!d"dZded#< g d$Zedd%d& ZG d'd( d(Zd9d+d,Zd9d-d.Zed:d0d1Zd2d3 Zed;d6d7Zd8S )<
Membershipz
    Membership
    .membershipIdzMembership plan ID.)aliasdescriptionr
   membership_idzMembership plan name.)r   r   titlezMembership plan description.r   zList of membership plan perks.zconlist(StrictStr, min_items=1)benefitsz/Monthly fee for membership plan. (e.g. 1500.00)zUnion[StrictFloat, StrictInt]pricez!The currency of membership.price.currencymemberCountz4Number of members subscribed to the membership plan.member_countmemberLimitzXThe upper limit of members who can subscribe. If no upper limit is set, it will be null.zOptional[StrictInt]member_limitisInAppPurchasez<Payment method for users who subscribe to a membership plan.r   is_in_app_purchaseisPublishedzMembership plan status.is_published)
r   r   r   r   r   r   r   r   r   r   c                 C  s   |dvrt d|S )zValidates the enum)JPYTWDTHBz0must be one of enum values ('JPY', 'TWD', 'THB'))
ValueError)clsvalue r%   f/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/linebot/v3/messaging/models/membership.pycurrency_validate_enum)   s   z!Membership.currency_validate_enumc                   @  s   e Zd ZdZdZdZdS )zMembership.ConfigzPydantic configurationTN)__name__
__module____qualname____doc__allow_population_by_field_namevalidate_assignmentr%   r%   r%   r&   Config0   s    r.   returnstrc                 C  s   t | jddS )z:Returns the string representation of the model using aliasT)by_alias)pprintpformatdictselfr%   r%   r&   to_str5   s   zMembership.to_strc                 C  s   t |  S )z8Returns the JSON representation of the model using alias)jsondumpsto_dictr5   r%   r%   r&   to_json9   s   zMembership.to_jsonjson_strc                 C  s   |  t|S )z3Create an instance of Membership from a JSON string)	from_dictr8   loads)r#   r<   r%   r%   r&   	from_json=   s   zMembership.from_jsonc                 C  s0   | j di dd}| jdu rd| jv rd|d< |S )z>Returns the dictionary representation of the model using aliasT)r1   excludeexclude_noneNr   r   )r4   r   __fields_set__)r6   _dictr%   r%   r&   r:   B   s   zMembership.to_dictobjr4   c                 C  s   |du rdS t |tst|S t|d|d|d|d|d|d|d|d	|d
|dd
}|S )z,Create an instance of Membership from a dictNr   r   r   r   r   r   r   r   r   r   )
r   r   r   r   r   r   r   r   r   r   )
isinstancer4   r   	parse_objget)r#   rD   _objr%   r%   r&   r=   O   s"   

zMembership.from_dictN)r/   r0   )r<   r0   r/   r   )rD   r4   r/   r   )r(   r)   r*   r+   r   r   __annotations__r   r   r   r   r   r   r   r   r   _Membership__propertiesr   r'   r.   r7   r;   classmethodr?   r:   r=   r%   r%   r%   r&   r      s.   
 


r   )r+   
__future__r   r2   rer8   typingr   r   r   pydantic.v1r   r   r   r	   r
   r   r   r   r   r%   r%   r%   r&   <module>   s   (