o
    ɶd/J                     @   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	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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d0d/ Zd1d2 Zd3d4 Zd5d6 Zd7S )8	WafConfigzI
    The Web Application Firewall configuration for the WAAS policy.
    c                 K   s   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dddd| _d | _d | _d | _d | _d | _d | _d | _d | _	d | _
d | _d | _d | _d | _d | _d | _d S )!aK  
        Initializes a new WafConfig object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param access_rules:
            The value to assign to the access_rules property of this WafConfig.
        :type access_rules: list[oci.waas.models.AccessRule]

        :param address_rate_limiting:
            The value to assign to the address_rate_limiting property of this WafConfig.
        :type address_rate_limiting: oci.waas.models.AddressRateLimiting

        :param captchas:
            The value to assign to the captchas property of this WafConfig.
        :type captchas: list[oci.waas.models.Captcha]

        :param device_fingerprint_challenge:
            The value to assign to the device_fingerprint_challenge property of this WafConfig.
        :type device_fingerprint_challenge: oci.waas.models.DeviceFingerprintChallenge

        :param good_bots:
            The value to assign to the good_bots property of this WafConfig.
        :type good_bots: list[oci.waas.models.GoodBot]

        :param human_interaction_challenge:
            The value to assign to the human_interaction_challenge property of this WafConfig.
        :type human_interaction_challenge: oci.waas.models.HumanInteractionChallenge

        :param js_challenge:
            The value to assign to the js_challenge property of this WafConfig.
        :type js_challenge: oci.waas.models.JsChallenge

        :param origin:
            The value to assign to the origin property of this WafConfig.
        :type origin: str

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

        :param custom_protection_rules:
            The value to assign to the custom_protection_rules property of this WafConfig.
        :type custom_protection_rules: list[oci.waas.models.CustomProtectionRuleSetting]

        :param origin_groups:
            The value to assign to the origin_groups property of this WafConfig.
        :type origin_groups: list[str]

        :param protection_rules:
            The value to assign to the protection_rules property of this WafConfig.
        :type protection_rules: list[oci.waas.models.ProtectionRule]

        :param protection_settings:
            The value to assign to the protection_settings property of this WafConfig.
        :type protection_settings: oci.waas.models.ProtectionSettings

        :param threat_feeds:
            The value to assign to the threat_feeds property of this WafConfig.
        :type threat_feeds: list[oci.waas.models.ThreatFeed]

        :param whitelists:
            The value to assign to the whitelists property of this WafConfig.
        :type whitelists: list[oci.waas.models.Whitelist]

        zlist[AccessRule]ZAddressRateLimitingzlist[Captcha]ZDeviceFingerprintChallengezlist[GoodBot]ZHumanInteractionChallengeZJsChallengestrzlist[CachingRule]z!list[CustomProtectionRuleSetting]z	list[str]zlist[ProtectionRule]ZProtectionSettingszlist[ThreatFeed]zlist[Whitelist])access_rulesaddress_rate_limitingcaptchasdevice_fingerprint_challenge	good_botshuman_interaction_challengejs_challengeorigincaching_rulescustom_protection_rulesorigin_groupsprotection_rulesprotection_settingsthreat_feeds
whitelistsZaccessRulesZaddressRateLimitingr
   ZdeviceFingerprintChallengeZgoodBotsZhumanInteractionChallengeZjsChallenger   ZcachingRulesZcustomProtectionRulesZoriginGroupsZprotectionRulesZprotectionSettingsZthreatFeedsr   N)Zswagger_typesZattribute_map_access_rules_address_rate_limiting	_captchas_device_fingerprint_challenge
_good_bots_human_interaction_challenge_js_challenge_origin_caching_rules_custom_protection_rules_origin_groups_protection_rules_protection_settings_threat_feeds_whitelists)selfkwargs r(   >usr/lib/python3.10/site-packages/oci/waas/models/waf_config.py__init__   s^   C
zWafConfig.__init__c                 C      | j S )ah  
        Gets the access_rules of this WafConfig.
        The access rules applied to the Web Application Firewall. Used for defining custom access policies with the combination of `ALLOW`, `DETECT`, and `BLOCK` rules, based on different criteria.


        :return: The access_rules of this WafConfig.
        :rtype: list[oci.waas.models.AccessRule]
        r   r&   r(   r(   r)   r         
zWafConfig.access_rulesc                 C   
   || _ dS )as  
        Sets the access_rules of this WafConfig.
        The access rules applied to the Web Application Firewall. Used for defining custom access policies with the combination of `ALLOW`, `DETECT`, and `BLOCK` rules, based on different criteria.


        :param access_rules: The access_rules of this WafConfig.
        :type: list[oci.waas.models.AccessRule]
        Nr,   )r&   r   r(   r(   r)   r         

c                 C   r+   )a  
        Gets the address_rate_limiting of this WafConfig.
        The IP address rate limiting settings used to limit the number of requests from an address.


        :return: The address_rate_limiting of this WafConfig.
        :rtype: oci.waas.models.AddressRateLimiting
        r   r-   r(   r(   r)   r	      r.   zWafConfig.address_rate_limitingc                 C   r/   )a/  
        Sets the address_rate_limiting of this WafConfig.
        The IP address rate limiting settings used to limit the number of requests from an address.


        :param address_rate_limiting: The address_rate_limiting of this WafConfig.
        :type: oci.waas.models.AddressRateLimiting
        Nr1   )r&   r	   r(   r(   r)   r	      r0   c                 C   r+   )a  
        Gets the captchas of this WafConfig.
        A list of CAPTCHA challenge settings. These are used to challenge requests with a CAPTCHA to block bots.


        :return: The captchas of this WafConfig.
        :rtype: list[oci.waas.models.Captcha]
        r   r-   r(   r(   r)   r
      r.   zWafConfig.captchasc                 C   r/   )a  
        Sets the captchas of this WafConfig.
        A list of CAPTCHA challenge settings. These are used to challenge requests with a CAPTCHA to block bots.


        :param captchas: The captchas of this WafConfig.
        :type: list[oci.waas.models.Captcha]
        Nr2   )r&   r
   r(   r(   r)   r
      r0   c                 C   r+   )ak  
        Gets the device_fingerprint_challenge of this WafConfig.
        The device fingerprint challenge settings. Used to detect unique devices based on the device fingerprint information collected in order to block bots.


        :return: The device_fingerprint_challenge of this WafConfig.
        :rtype: oci.waas.models.DeviceFingerprintChallenge
        r   r-   r(   r(   r)   r      r.   z&WafConfig.device_fingerprint_challengec                 C   r/   )a  
        Sets the device_fingerprint_challenge of this WafConfig.
        The device fingerprint challenge settings. Used to detect unique devices based on the device fingerprint information collected in order to block bots.


        :param device_fingerprint_challenge: The device_fingerprint_challenge of this WafConfig.
        :type: oci.waas.models.DeviceFingerprintChallenge
        Nr3   )r&   r   r(   r(   r)   r      r0   c                 C   r+   )z
        Gets the good_bots of this WafConfig.
        A list of bots allowed to access the web application.


        :return: The good_bots of this WafConfig.
        :rtype: list[oci.waas.models.GoodBot]
        r   r-   r(   r(   r)   r      r.   zWafConfig.good_botsc                 C   r/   )z
        Sets the good_bots of this WafConfig.
        A list of bots allowed to access the web application.


        :param good_bots: The good_bots of this WafConfig.
        :type: list[oci.waas.models.GoodBot]
        Nr4   )r&   r   r(   r(   r)   r      r0   c                 C   r+   )as  
        Gets the human_interaction_challenge of this WafConfig.
        The human interaction challenge settings. Used to look for natural human interactions such as mouse movements, time on site, and page scrolling to identify bots.


        :return: The human_interaction_challenge of this WafConfig.
        :rtype: oci.waas.models.HumanInteractionChallenge
        r   r-   r(   r(   r)   r      r.   z%WafConfig.human_interaction_challengec                 C   r/   )a  
        Sets the human_interaction_challenge of this WafConfig.
        The human interaction challenge settings. Used to look for natural human interactions such as mouse movements, time on site, and page scrolling to identify bots.


        :param human_interaction_challenge: The human_interaction_challenge of this WafConfig.
        :type: oci.waas.models.HumanInteractionChallenge
        Nr5   )r&   r   r(   r(   r)   r     r0   c                 C   r+   )aR  
        Gets the js_challenge of this WafConfig.
        The JavaScript challenge settings. Used to challenge requests with a JavaScript challenge and take the action if a browser has no JavaScript support in order to block bots.


        :return: The js_challenge of this WafConfig.
        :rtype: oci.waas.models.JsChallenge
        r   r-   r(   r(   r)   r     r.   zWafConfig.js_challengec                 C   r/   )a]  
        Sets the js_challenge of this WafConfig.
        The JavaScript challenge settings. Used to challenge requests with a JavaScript challenge and take the action if a browser has no JavaScript support in order to block bots.


        :param js_challenge: The js_challenge of this WafConfig.
        :type: oci.waas.models.JsChallenge
        Nr6   )r&   r   r(   r(   r)   r   $  r0   c                 C   r+   )aS  
        Gets the origin of this WafConfig.
        The key in the map of origins referencing the origin used for the Web Application Firewall. The origin must already be included in `Origins`. Required when creating the `WafConfig` resource, but not on update.


        :return: The origin of this WafConfig.
        :rtype: str
        r   r-   r(   r(   r)   r   0  r.   zWafConfig.originc                 C   r/   )aX  
        Sets the origin of this WafConfig.
        The key in the map of origins referencing the origin used for the Web Application Firewall. The origin must already be included in `Origins`. Required when creating the `WafConfig` resource, but not on update.


        :param origin: The origin of this WafConfig.
        :type: str
        Nr7   )r&   r   r(   r(   r)   r   <  r0   c                 C   r+   )z
        Gets the caching_rules of this WafConfig.
        A list of caching rules applied to the web application.


        :return: The caching_rules of this WafConfig.
        :rtype: list[oci.waas.models.CachingRule]
        r   r-   r(   r(   r)   r   H  r.   zWafConfig.caching_rulesc                 C   r/   )z
        Sets the caching_rules of this WafConfig.
        A list of caching rules applied to the web application.


        :param caching_rules: The caching_rules of this WafConfig.
        :type: list[oci.waas.models.CachingRule]
        Nr8   )r&   r   r(   r(   r)   r   T  r0   c                 C   r+   )a  
        Gets the custom_protection_rules of this WafConfig.
        A list of the custom protection rule OCIDs and their actions.


        :return: The custom_protection_rules of this WafConfig.
        :rtype: list[oci.waas.models.CustomProtectionRuleSetting]
        r    r-   r(   r(   r)   r   `  r.   z!WafConfig.custom_protection_rulesc                 C   r/   )a%  
        Sets the custom_protection_rules of this WafConfig.
        A list of the custom protection rule OCIDs and their actions.


        :param custom_protection_rules: The custom_protection_rules of this WafConfig.
        :type: list[oci.waas.models.CustomProtectionRuleSetting]
        Nr9   )r&   r   r(   r(   r)   r   l  r0   c                 C   r+   )a	  
        Gets the origin_groups of this WafConfig.
        The map of origin groups and their keys used to associate origins to the `wafConfig`. Origin groups allow you to apply weights to groups of origins for load balancing purposes. Origins with higher weights will receive larger proportions of client requests.
        To add additional origins to your WAAS policy, update the `origins` field of a `UpdateWaasPolicy` request.


        :return: The origin_groups of this WafConfig.
        :rtype: list[str]
        r!   r-   r(   r(   r)   r   x  s   zWafConfig.origin_groupsc                 C   r/   )a  
        Sets the origin_groups of this WafConfig.
        The map of origin groups and their keys used to associate origins to the `wafConfig`. Origin groups allow you to apply weights to groups of origins for load balancing purposes. Origins with higher weights will receive larger proportions of client requests.
        To add additional origins to your WAAS policy, update the `origins` field of a `UpdateWaasPolicy` request.


        :param origin_groups: The origin_groups of this WafConfig.
        :type: list[str]
        Nr:   )r&   r   r(   r(   r)   r     s   
c                 C   r+   )z
        Gets the protection_rules of this WafConfig.
        A list of the protection rules and their details.


        :return: The protection_rules of this WafConfig.
        :rtype: list[oci.waas.models.ProtectionRule]
        r"   r-   r(   r(   r)   r     r.   zWafConfig.protection_rulesc                 C   r/   )z
        Sets the protection_rules of this WafConfig.
        A list of the protection rules and their details.


        :param protection_rules: The protection_rules of this WafConfig.
        :type: list[oci.waas.models.ProtectionRule]
        Nr;   )r&   r   r(   r(   r)   r     r0   c                 C   r+   )z
        Gets the protection_settings of this WafConfig.
        The settings to apply to protection rules.


        :return: The protection_settings of this WafConfig.
        :rtype: oci.waas.models.ProtectionSettings
        r#   r-   r(   r(   r)   r     r.   zWafConfig.protection_settingsc                 C   r/   )z
        Sets the protection_settings of this WafConfig.
        The settings to apply to protection rules.


        :param protection_settings: The protection_settings of this WafConfig.
        :type: oci.waas.models.ProtectionSettings
        Nr<   )r&   r   r(   r(   r)   r     r0   c                 C   r+   )a"  
        Gets the threat_feeds of this WafConfig.
        A list of threat intelligence feeds and the actions to apply to known malicious traffic based on internet intelligence.


        :return: The threat_feeds of this WafConfig.
        :rtype: list[oci.waas.models.ThreatFeed]
        r$   r-   r(   r(   r)   r     r.   zWafConfig.threat_feedsc                 C   r/   )a-  
        Sets the threat_feeds of this WafConfig.
        A list of threat intelligence feeds and the actions to apply to known malicious traffic based on internet intelligence.


        :param threat_feeds: The threat_feeds of this WafConfig.
        :type: list[oci.waas.models.ThreatFeed]
        Nr=   )r&   r   r(   r(   r)   r     r0   c                 C   r+   )z
        Gets the whitelists of this WafConfig.
        A list of IP addresses that bypass the Web Application Firewall.


        :return: The whitelists of this WafConfig.
        :rtype: list[oci.waas.models.Whitelist]
        r%   r-   r(   r(   r)   r     r.   zWafConfig.whitelistsc                 C   r/   )z
        Sets the whitelists of this WafConfig.
        A list of IP addresses that bypass the Web Application Firewall.


        :param whitelists: The whitelists of this WafConfig.
        :type: list[oci.waas.models.Whitelist]
        Nr>   )r&   r   r(   r(   r)   r     r0   c                 C   s   t | S N)r   r-   r(   r(   r)   __repr__  s   zWafConfig.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r&   otherr(   r(   r)   __eq__  s   zWafConfig.__eq__c                 C   s
   | |k S r?   r(   rB   r(   r(   r)   __ne__  s   
zWafConfig.__ne__N)__name__
__module____qualname____doc__r*   propertyr   setterr	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r@   rD   rE   r(   r(   r(   r)   r      s    v





























r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r(   r(   r(   r)   <module>   s   