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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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 )"ÚCachingRulez
    CachingRule model.
    ÚCACHEÚBYPASS_CACHEc                 K   sZ   ddddddddœ| _ ddddd	d
ddœ| _d| _d| _d| _d| _d| _d| _d| _dS )a¤  
        Initializes a new CachingRule object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param key:
            The value to assign to the key property of this CachingRule.
        :type key: str

        :param name:
            The value to assign to the name property of this CachingRule.
        :type name: str

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

        :param caching_duration:
            The value to assign to the caching_duration property of this CachingRule.
        :type caching_duration: str

        :param is_client_caching_enabled:
            The value to assign to the is_client_caching_enabled property of this CachingRule.
        :type is_client_caching_enabled: bool

        :param client_caching_duration:
            The value to assign to the client_caching_duration property of this CachingRule.
        :type client_caching_duration: str

        :param criteria:
            The value to assign to the criteria property of this CachingRule.
        :type criteria: list[oci.waas.models.CachingRuleCriteria]

        ÚstrÚboolzlist[CachingRuleCriteria])ÚkeyÚnameÚactionÚcaching_durationÚis_client_caching_enabledÚclient_caching_durationÚcriteriar   r   r   ZcachingDurationZisClientCachingEnabledZclientCachingDurationr   N)	Zswagger_typesZattribute_mapÚ_keyÚ_nameÚ_actionÚ_caching_durationÚ_is_client_caching_enabledÚ_client_caching_durationÚ	_criteria)ÚselfÚkwargs© r   ú@usr/lib/python3.10/site-packages/oci/waas/models/caching_rule.pyÚ__init__   s.   %ùù

zCachingRule.__init__c                 C   ó   | j S )z¤
        Gets the key of this CachingRule.
        The unique key for the caching rule.


        :return: The key of this CachingRule.
        :rtype: str
        ©r   ©r   r   r   r   r   Z   ó   
zCachingRule.keyc                 C   ó
   || _ dS )z¦
        Sets the key of this CachingRule.
        The unique key for the caching rule.


        :param key: The key of this CachingRule.
        :type: str
        Nr   )r   r   r   r   r   r   f   ó   

c                 C   r   )z®
        **[Required]** Gets the name of this CachingRule.
        The name of the caching rule.


        :return: The name of this CachingRule.
        :rtype: str
        ©r   r    r   r   r   r   r   r!   zCachingRule.namec                 C   r"   )z¢
        Sets the name of this CachingRule.
        The name of the caching rule.


        :param name: The name of this CachingRule.
        :type: str
        Nr$   )r   r   r   r   r   r   ~   r#   c                 C   r   )aj  
        **[Required]** Gets the action of this CachingRule.
        The action to take when the criteria of a caching rule are met.
        - **CACHE:** Caches requested content when the criteria of the rule are met.

        - **BYPASS_CACHE:** Allows requests to bypass the cache and be directed to the origin when the criteria of the rule is met.

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


        :return: The action of this CachingRule.
        :rtype: str
        )r   r    r   r   r   r   Š   s   zCachingRule.actionc                 C   s    ddg}t ||ƒsd}|| _dS )a¤  
        Sets the action of this CachingRule.
        The action to take when the criteria of a caching rule are met.
        - **CACHE:** Caches requested content when the criteria of the rule are met.

        - **BYPASS_CACHE:** Allows requests to bypass the cache and be directed to the origin when the criteria of the rule is met.


        :param action: The action of this CachingRule.
        :type: str
        r   r   ZUNKNOWN_ENUM_VALUEN)r   r   )r   r   Zallowed_valuesr   r   r   r   œ   s   

c                 C   r   )aà  
        Gets the caching_duration of this CachingRule.
        The duration to cache content for the caching rule, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`.
        Example: `PT1H`


        :return: The caching_duration of this CachingRule.
        :rtype: str
        ©r   r    r   r   r   r   ®   ó   zCachingRule.caching_durationc                 C   r"   )aï  
        Sets the caching_duration of this CachingRule.
        The duration to cache content for the caching rule, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`.
        Example: `PT1H`


        :param caching_duration: The caching_duration of this CachingRule.
        :type: str
        Nr%   )r   r   r   r   r   r   »   ó   
c                 C   r   )a€  
        Gets the is_client_caching_enabled of this CachingRule.
        Enables or disables client caching.
        Browsers use the `Cache-Control` header value for caching content locally in the browser. This setting overrides the addition of a `Cache-Control` header in responses.


        :return: The is_client_caching_enabled of this CachingRule.
        :rtype: bool
        ©r   r    r   r   r   r   È   r&   z%CachingRule.is_client_caching_enabledc                 C   r"   )a˜  
        Sets the is_client_caching_enabled of this CachingRule.
        Enables or disables client caching.
        Browsers use the `Cache-Control` header value for caching content locally in the browser. This setting overrides the addition of a `Cache-Control` header in responses.


        :param is_client_caching_enabled: The is_client_caching_enabled of this CachingRule.
        :type: bool
        Nr(   )r   r   r   r   r   r   Õ   r'   c                 C   r   )aï  
        Gets the client_caching_duration of this CachingRule.
        The duration to cache content in the user's browser, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`.
        Example: `PT1H`


        :return: The client_caching_duration of this CachingRule.
        :rtype: str
        ©r   r    r   r   r   r   â   r&   z#CachingRule.client_caching_durationc                 C   r"   )a  
        Sets the client_caching_duration of this CachingRule.
        The duration to cache content in the user's browser, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`.
        Example: `PT1H`


        :param client_caching_duration: The client_caching_duration of this CachingRule.
        :type: str
        Nr)   )r   r   r   r   r   r   ï   r'   c                 C   r   )aU  
        **[Required]** Gets the criteria of this CachingRule.
        The array of the rule criteria with condition and value. The caching rule would be applied for the requests that matched any of the listed conditions.


        :return: The criteria of this CachingRule.
        :rtype: list[oci.waas.models.CachingRuleCriteria]
        ©r   r    r   r   r   r   ü   r!   zCachingRule.criteriac                 C   r"   )aM  
        Sets the criteria of this CachingRule.
        The array of the rule criteria with condition and value. The caching rule would be applied for the requests that matched any of the listed conditions.


        :param criteria: The criteria of this CachingRule.
        :type: list[oci.waas.models.CachingRuleCriteria]
        Nr*   )r   r   r   r   r   r     r#   c                 C   s   t | ƒS ©N)r   r    r   r   r   Ú__repr__  s   zCachingRule.__repr__c                 C   s   |d u rdS | j |j kS )NF)Ú__dict__©r   Úotherr   r   r   Ú__eq__  s   zCachingRule.__eq__c                 C   s
   | |k S r+   r   r.   r   r   r   Ú__ne__  s   
zCachingRule.__ne__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZACTION_CACHEZACTION_BYPASS_CACHEr   Úpropertyr   Úsetterr   r   r   r   r   r   r,   r0   r1   r   r   r   r   r      sH    @













r   N)Zoci.utilr   r   r   Zoci.decoratorsr   Úobjectr   r   r   r   r   Ú<module>   s   