o
    ɶd                     @   sD   d dl mZ ddlmZmZmZ ddlmZ eG dd deZdS )   )WebAppFirewallPolicyRule    )formatted_flat_dictNONE_SENTINEL#value_allowed_none_or_none_sentinel)init_model_state_from_kwargsc                   @   s~   e 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	dd Z
dd Zdd ZdS )ProtectionRulez
    Rule that represents Request/Response Protection.
    Only actions of the following types are allowed to be referenced in this rule:
    * CHECK
    * RETURN_HTTP_RESPONSE
    c              	   K   sj   dddd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 )aG  
        Initializes a new ProtectionRule object with values from keyword arguments. The default value of the :py:attr:`~oci.waf.models.ProtectionRule.type` attribute
        of this class is ``PROTECTION`` and it should not be changed.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param type:
            The value to assign to the type property of this ProtectionRule.
            Allowed values for this property are: "ACCESS_CONTROL", "PROTECTION", "REQUEST_RATE_LIMITING"
        :type type: str

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

        :param condition_language:
            The value to assign to the condition_language property of this ProtectionRule.
            Allowed values for this property are: "JMESPATH"
        :type condition_language: str

        :param condition:
            The value to assign to the condition property of this ProtectionRule.
        :type condition: str

        :param action_name:
            The value to assign to the action_name property of this ProtectionRule.
        :type action_name: str

        :param protection_capabilities:
            The value to assign to the protection_capabilities property of this ProtectionRule.
        :type protection_capabilities: list[oci.waf.models.ProtectionCapability]

        :param protection_capability_settings:
            The value to assign to the protection_capability_settings property of this ProtectionRule.
        :type protection_capability_settings: oci.waf.models.ProtectionCapabilitySettings

        :param is_body_inspection_enabled:
            The value to assign to the is_body_inspection_enabled property of this ProtectionRule.
        :type is_body_inspection_enabled: bool

        strzlist[ProtectionCapability]ZProtectionCapabilitySettingsbool)typenameZcondition_language	conditionZaction_nameprotection_capabilitiesprotection_capability_settingsis_body_inspection_enabledr   r   ZconditionLanguager   Z
actionNameZprotectionCapabilitiesZprotectionCapabilitySettingsZisBodyInspectionEnabledNZ
PROTECTION)
Zswagger_typesZattribute_mapZ_type_nameZ_condition_languageZ
_conditionZ_action_name_protection_capabilities_protection_capability_settings_is_body_inspection_enabled)selfkwargs r   Busr/lib/python3.10/site-packages/oci/waf/models/protection_rule.py__init__   s6   *
zProtectionRule.__init__c                 C      | j S )a?  
        **[Required]** Gets the protection_capabilities of this ProtectionRule.
        An ordered list that references OCI-managed protection capabilities.
        Referenced protection capabilities are not necessarily executed in order of appearance. Their execution order
        is decided at runtime for improved performance.
        The array cannot contain entries with the same pair of capability key and version more than once.


        :return: The protection_capabilities of this ProtectionRule.
        :rtype: list[oci.waf.models.ProtectionCapability]
        r   r   r   r   r   r   ^   s   z&ProtectionRule.protection_capabilitiesc                 C   
   || _ dS )aF  
        Sets the protection_capabilities of this ProtectionRule.
        An ordered list that references OCI-managed protection capabilities.
        Referenced protection capabilities are not necessarily executed in order of appearance. Their execution order
        is decided at runtime for improved performance.
        The array cannot contain entries with the same pair of capability key and version more than once.


        :param protection_capabilities: The protection_capabilities of this ProtectionRule.
        :type: list[oci.waf.models.ProtectionCapability]
        Nr   )r   r   r   r   r   r   m   s   
c                 C   r   )z
        Gets the protection_capability_settings of this ProtectionRule.

        :return: The protection_capability_settings of this ProtectionRule.
        :rtype: oci.waf.models.ProtectionCapabilitySettings
        r   r   r   r   r   r   |   s   z-ProtectionRule.protection_capability_settingsc                 C   r   )z
        Sets the protection_capability_settings of this ProtectionRule.

        :param protection_capability_settings: The protection_capability_settings of this ProtectionRule.
        :type: oci.waf.models.ProtectionCapabilitySettings
        Nr   )r   r   r   r   r   r      s   
c                 C   r   )a  
        Gets the is_body_inspection_enabled of this ProtectionRule.
        Enables/disables body inspection for this protection rule.
        Only Protection Rules in RequestProtection can have this option enabled. Response body inspection will
        be available at a later date.


        :return: The is_body_inspection_enabled of this ProtectionRule.
        :rtype: bool
        r   r   r   r   r   r      s   z)ProtectionRule.is_body_inspection_enabledc                 C   r   )a  
        Sets the is_body_inspection_enabled of this ProtectionRule.
        Enables/disables body inspection for this protection rule.
        Only Protection Rules in RequestProtection can have this option enabled. Response body inspection will
        be available at a later date.


        :param is_body_inspection_enabled: The is_body_inspection_enabled of this ProtectionRule.
        :type: bool
        Nr   )r   r   r   r   r   r      s   
c                 C   s   t | S N)r   r   r   r   r   __repr__   s   zProtectionRule.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r   otherr   r   r   __eq__   s   zProtectionRule.__eq__c                 C   s
   | |k S r    r   r#   r   r   r   __ne__   s   
zProtectionRule.__ne__N)__name__
__module____qualname____doc__r   propertyr   setterr   r   r!   r%   r&   r   r   r   r   r      s$    I


	
	

r   N)	Zweb_app_firewall_policy_ruler   Zoci.utilr   r   r   Zoci.decoratorsr   r   r   r   r   r   <module>   s
   