o
    ɶd                     @   s8   d dl mZmZmZ d dlmZ eG dd deZdS )    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
d Zedd Zejdd Zedd Zejdd Zedd Zejdd Zedd Zejdd Zdd Zdd Zdd ZdS )Quotaz(
    Quota policy for a usage plan.
    MINUTEHOURDAYWEEKMONTHCALENDARREJECTALLOWc                 K   s<   ddddd| _ ddddd| _d| _d| _d| _d| _dS )	a  
        Initializes a new Quota object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param value:
            The value to assign to the value property of this Quota.
        :type value: int

        :param unit:
            The value to assign to the unit property of this Quota.
            Allowed values for this property are: "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type unit: str

        :param reset_policy:
            The value to assign to the reset_policy property of this Quota.
            Allowed values for this property are: "CALENDAR", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type reset_policy: str

        :param operation_on_breach:
            The value to assign to the operation_on_breach property of this Quota.
            Allowed values for this property are: "REJECT", "ALLOW", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type operation_on_breach: str

        intstr)valueunitreset_policyoperation_on_breachr   r   ZresetPolicyZoperationOnBreachN)Zswagger_typesZattribute_map_value_unit_reset_policy_operation_on_breach)selfkwargs r   ?usr/lib/python3.10/site-packages/oci/apigateway/models/quota.py__init__2   s   
zQuota.__init__c                 C      | j S )z
        **[Required]** Gets the value of this Quota.
        The number of requests that can be made per time period.


        :return: The value of this Quota.
        :rtype: int
        r   r   r   r   r   r   a   s   
zQuota.valuec                 C   s
   || _ dS )z
        Sets the value of this Quota.
        The number of requests that can be made per time period.


        :param value: The value of this Quota.
        :type: int
        Nr   )r   r   r   r   r   r   m   s   

c                 C   r   )a  
        **[Required]** Gets the unit of this Quota.
        The unit of time over which quotas are calculated.
        Example: `MINUTE` or `MONTH`

        Allowed values for this property are: "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The unit of this Quota.
        :rtype: str
        )r   r    r   r   r   r   y      z
Quota.unitc                 C   s    g d}t ||sd}|| _dS )z
        Sets the unit of this Quota.
        The unit of time over which quotas are calculated.
        Example: `MINUTE` or `MONTH`


        :param unit: The unit of this Quota.
        :type: str
        )r   r   r	   r
   r   UNKNOWN_ENUM_VALUEN)r   r   )r   r   allowed_valuesr   r   r   r      s   

c                 C   r   )a  
        **[Required]** Gets the reset_policy of this Quota.
        The policy that controls when quotas will reset.
        Example: `CALENDAR`

        Allowed values for this property are: "CALENDAR", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The reset_policy of this Quota.
        :rtype: str
        )r   r    r   r   r   r      r!   zQuota.reset_policyc                 C   s   dg}t ||s
d}|| _dS )z
        Sets the reset_policy of this Quota.
        The policy that controls when quotas will reset.
        Example: `CALENDAR`


        :param reset_policy: The reset_policy of this Quota.
        :type: str
        r   r"   N)r   r   )r   r   r#   r   r   r   r      s   

c                 C   r   )a  
        **[Required]** Gets the operation_on_breach of this Quota.
        What the usage plan will do when a quota is breached:
        `REJECT` will allow no further requests
        `ALLOW` will continue to allow further requests

        Allowed values for this property are: "REJECT", "ALLOW", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The operation_on_breach of this Quota.
        :rtype: str
        )r   r    r   r   r   r      s   zQuota.operation_on_breachc                 C   s    ddg}t ||sd}|| _dS )aC  
        Sets the operation_on_breach of this Quota.
        What the usage plan will do when a quota is breached:
        `REJECT` will allow no further requests
        `ALLOW` will continue to allow further requests


        :param operation_on_breach: The operation_on_breach of this Quota.
        :type: str
        r   r   r"   N)r   r   )r   r   r#   r   r   r   r      s   

c                 C   s   t | S N)r   r    r   r   r   __repr__   s   zQuota.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r   otherr   r   r   __eq__   s   zQuota.__eq__c                 C   s
   | |k S r$   r   r'   r   r   r   __ne__   s   
zQuota.__ne__N)__name__
__module____qualname____doc__ZUNIT_MINUTEZ	UNIT_HOURZUNIT_DAYZ	UNIT_WEEKZ
UNIT_MONTHZRESET_POLICY_CALENDARZOPERATION_ON_BREACH_REJECTZOPERATION_ON_BREACH_ALLOWr   propertyr   setterr   r   r   r%   r)   r*   r   r   r   r   r      s<    /







r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r   r   r   r   <module>   s   