o
    ɶdv                     @   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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 )RequestProtectionzf
    Module that allows to enable OCI-managed protection capabilities for incoming HTTP requests.
    c                 K   s2   dddd| _ dddd| _d| _d| _d| _dS )	aH  
        Initializes a new RequestProtection object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

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

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

        :param body_inspection_size_limit_exceeded_action_name:
            The value to assign to the body_inspection_size_limit_exceeded_action_name property of this RequestProtection.
        :type body_inspection_size_limit_exceeded_action_name: str

        zlist[ProtectionRule]intstr)rules#body_inspection_size_limit_in_bytes/body_inspection_size_limit_exceeded_action_namer	   ZbodyInspectionSizeLimitInBytesZ)bodyInspectionSizeLimitExceededActionNameN)Zswagger_typesZattribute_map_rules$_body_inspection_size_limit_in_bytes0_body_inspection_size_limit_exceeded_action_name)selfkwargs r   Eusr/lib/python3.10/site-packages/oci/waf/models/request_protection.py__init__   s   
zRequestProtection.__init__c                 C      | j S )a{  
        Gets the rules of this RequestProtection.
        Ordered list of ProtectionRules. Rules are executed in order of appearance in this array.
        ProtectionRules in this array can only use protection Capabilities of REQUEST_PROTECTION_CAPABILITY type.


        :return: The rules of this RequestProtection.
        :rtype: list[oci.waf.models.ProtectionRule]
        r   r   r   r   r   r	   4   s   zRequestProtection.rulesc                 C   
   || _ dS )a  
        Sets the rules of this RequestProtection.
        Ordered list of ProtectionRules. Rules are executed in order of appearance in this array.
        ProtectionRules in this array can only use protection Capabilities of REQUEST_PROTECTION_CAPABILITY type.


        :param rules: The rules of this RequestProtection.
        :type: list[oci.waf.models.ProtectionRule]
        Nr   )r   r	   r   r   r   r	   A   s   
c                 C   r   )a  
        Gets the body_inspection_size_limit_in_bytes of this RequestProtection.
        Maximum size of inspected HTTP message body in bytes. Actions to take if this limit is exceeded are defined in `bodyInspectionSizeLimitExceededActionName`.

        Body inspection maximum size allowed is defined with per-tenancy limit: 8192 bytes.


        :return: The body_inspection_size_limit_in_bytes of this RequestProtection.
        :rtype: int
        r   r   r   r   r   r
   N   s   z5RequestProtection.body_inspection_size_limit_in_bytesc                 C   r   )a  
        Sets the body_inspection_size_limit_in_bytes of this RequestProtection.
        Maximum size of inspected HTTP message body in bytes. Actions to take if this limit is exceeded are defined in `bodyInspectionSizeLimitExceededActionName`.

        Body inspection maximum size allowed is defined with per-tenancy limit: 8192 bytes.


        :param body_inspection_size_limit_in_bytes: The body_inspection_size_limit_in_bytes of this RequestProtection.
        :type: int
        Nr   )r   r
   r   r   r   r
   \   s   
c                 C   r   )a  
        Gets the body_inspection_size_limit_exceeded_action_name of this RequestProtection.
        References action by name from actions defined in WebAppFirewallPolicy. Executed if HTTP message
        body size exceeds limit set in field `bodyInspectionSizeLimitInBytes`.

        If this field is `null` HTTP message body will inspected up to `bodyInspectionSizeLimitInBytes` and the rest
        will not be inspected by Protection Capabilities.

        Allowed action types:
        * **RETURN_HTTP_RESPONSE** terminates further execution of modules and rules and returns defined HTTP response.


        :return: The body_inspection_size_limit_exceeded_action_name of this RequestProtection.
        :rtype: str
        r   r   r   r   r   r   j   s   zARequestProtection.body_inspection_size_limit_exceeded_action_namec                 C   r   )a  
        Sets the body_inspection_size_limit_exceeded_action_name of this RequestProtection.
        References action by name from actions defined in WebAppFirewallPolicy. Executed if HTTP message
        body size exceeds limit set in field `bodyInspectionSizeLimitInBytes`.

        If this field is `null` HTTP message body will inspected up to `bodyInspectionSizeLimitInBytes` and the rest
        will not be inspected by Protection Capabilities.

        Allowed action types:
        * **RETURN_HTTP_RESPONSE** terminates further execution of modules and rules and returns defined HTTP response.


        :param body_inspection_size_limit_exceeded_action_name: The body_inspection_size_limit_exceeded_action_name of this RequestProtection.
        :type: str
        Nr   )r   r   r   r   r   r   }   s   
c                 C   s   t | S N)r   r   r   r   r   __repr__   s   zRequestProtection.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r   otherr   r   r   __eq__   s   zRequestProtection.__eq__c                 C   s
   | |k S r   r   r   r   r   r   __ne__   s   
zRequestProtection.__ne__N)__name__
__module____qualname____doc__r   propertyr	   setterr
   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   