o
    ɶd^n                     @   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ed1d2 Zejd3d2 Zed4d5 Zejd6d5 Zed7d8 Zejd9d8 Zed:d; Zejd<d; Zed=d> Zejd?d> Zed@dA ZejdBdA ZedCdD ZejdEdD ZedFdG ZejdHdG ZedIdJ ZejdKdJ ZedLdM ZejdNdM ZedOdP Z e jdQdP Z edRdS Z!e!jdTdS Z!edUdV Z"e"jdWdV Z"dXdY Z#dZd[ Z$d\d] Z%d^S )_WafLoga  
    A list of Web Application Firewall log entries. Each entry is a JSON object, including a timestamp property and other fields varying based on log type. Logs record what rules and countermeasures are triggered by requests and are used as a basis to move request handling into block mode. For more information about WAF logs, see `Logs`__.

    __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/logs.htm
    c                 K   s  i 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| _ i 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| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _	d0| _
d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0| _d0S )1a|  
        Initializes a new WafLog object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param action:
            The value to assign to the action property of this WafLog.
        :type action: str

        :param captcha_action:
            The value to assign to the captcha_action property of this WafLog.
        :type captcha_action: str

        :param captcha_expected:
            The value to assign to the captcha_expected property of this WafLog.
        :type captcha_expected: str

        :param captcha_received:
            The value to assign to the captcha_received property of this WafLog.
        :type captcha_received: str

        :param captcha_fail_count:
            The value to assign to the captcha_fail_count property of this WafLog.
        :type captcha_fail_count: str

        :param client_address:
            The value to assign to the client_address property of this WafLog.
        :type client_address: str

        :param country_name:
            The value to assign to the country_name property of this WafLog.
        :type country_name: str

        :param user_agent:
            The value to assign to the user_agent property of this WafLog.
        :type user_agent: str

        :param domain:
            The value to assign to the domain property of this WafLog.
        :type domain: str

        :param protection_rule_detections:
            The value to assign to the protection_rule_detections property of this WafLog.
        :type protection_rule_detections: dict(str, str)

        :param http_method:
            The value to assign to the http_method property of this WafLog.
        :type http_method: str

        :param request_url:
            The value to assign to the request_url property of this WafLog.
        :type request_url: str

        :param http_headers:
            The value to assign to the http_headers property of this WafLog.
        :type http_headers: dict(str, str)

        :param referrer:
            The value to assign to the referrer property of this WafLog.
        :type referrer: str

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

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

        :param incident_key:
            The value to assign to the incident_key property of this WafLog.
        :type incident_key: str

        :param fingerprint:
            The value to assign to the fingerprint property of this WafLog.
        :type fingerprint: str

        :param device:
            The value to assign to the device property of this WafLog.
        :type device: str

        :param country_code:
            The value to assign to the country_code property of this WafLog.
        :type country_code: str

        :param request_headers:
            The value to assign to the request_headers property of this WafLog.
        :type request_headers: dict(str, str)

        :param threat_feed_key:
            The value to assign to the threat_feed_key property of this WafLog.
        :type threat_feed_key: str

        :param access_rule_key:
            The value to assign to the access_rule_key property of this WafLog.
        :type access_rule_key: str

        :param address_rate_limiting_key:
            The value to assign to the address_rate_limiting_key property of this WafLog.
        :type address_rate_limiting_key: str

        :param timestamp:
            The value to assign to the timestamp property of this WafLog.
        :type timestamp: datetime

        :param log_type:
            The value to assign to the log_type property of this WafLog.
        :type log_type: str

        :param origin_address:
            The value to assign to the origin_address property of this WafLog.
        :type origin_address: str

        :param origin_response_time:
            The value to assign to the origin_response_time property of this WafLog.
        :type origin_response_time: str

        actionstrcaptcha_actioncaptcha_expectedcaptcha_receivedcaptcha_fail_countclient_addresscountry_name
user_agentdomainprotection_rule_detectionszdict(str, str)http_methodrequest_urlhttp_headersreferrerresponse_codeintresponse_sizeincident_keydatetime)fingerprintdevicecountry_coderequest_headersthreat_feed_keyaccess_rule_keyaddress_rate_limiting_key	timestamplog_typeorigin_addressorigin_response_timeZcaptchaActionZcaptchaExpectedZcaptchaReceivedZcaptchaFailCountZclientAddressZcountryNameZ	userAgentZprotectionRuleDetectionsZ
httpMethodZ
requestUrlZhttpHeadersZresponseCodeZresponseSizeZincidentKeyr   r   ZcountryCodeZrequestHeadersZthreatFeedKeyZaccessRuleKeyZaddressRateLimitingKeyr"   ZlogTypeZoriginAddressZoriginResponseTimeN)Zswagger_typesZattribute_map_action_captcha_action_captcha_expected_captcha_received_captcha_fail_count_client_address_country_name_user_agent_domain_protection_rule_detections_http_method_request_url_http_headers	_referrer_response_code_response_size_incident_key_fingerprint_device_country_code_request_headers_threat_feed_key_access_rule_key_address_rate_limiting_key
_timestamp	_log_type_origin_address_origin_response_time)selfkwargs rD   ;usr/lib/python3.10/site-packages/oci/waas/models/waf_log.py__init__   s   v	

	


zWafLog.__init__c                 C      | j S )z
        Gets the action of this WafLog.
        The action taken on the request, either `ALLOW`, `DETECT`, or `BLOCK`.


        :return: The action of this WafLog.
        :rtype: str
        r&   rB   rD   rD   rE   r         
zWafLog.actionc                 C   
   || _ dS )z
        Sets the action of this WafLog.
        The action taken on the request, either `ALLOW`, `DETECT`, or `BLOCK`.


        :param action: The action of this WafLog.
        :type: str
        NrH   )rB   r   rD   rD   rE   r         

c                 C   rG   )a  
        Gets the captcha_action of this WafLog.
        The CAPTCHA action taken on the request, `ALLOW` or `BLOCK`. For more information about
        CAPTCHAs, see `UpdateCaptchas`.


        :return: The captcha_action of this WafLog.
        :rtype: str
        r'   rI   rD   rD   rE   r	         zWafLog.captcha_actionc                 C   rK   )a  
        Sets the captcha_action of this WafLog.
        The CAPTCHA action taken on the request, `ALLOW` or `BLOCK`. For more information about
        CAPTCHAs, see `UpdateCaptchas`.


        :param captcha_action: The captcha_action of this WafLog.
        :type: str
        NrM   )rB   r	   rD   rD   rE   r	   
     
c                 C   rG   )z
        Gets the captcha_expected of this WafLog.
        The CAPTCHA challenge answer that was expected.


        :return: The captcha_expected of this WafLog.
        :rtype: str
        r(   rI   rD   rD   rE   r
     rJ   zWafLog.captcha_expectedc                 C   rK   )z
        Sets the captcha_expected of this WafLog.
        The CAPTCHA challenge answer that was expected.


        :param captcha_expected: The captcha_expected of this WafLog.
        :type: str
        NrP   )rB   r
   rD   rD   rE   r
   #  rL   c                 C   rG   )z
        Gets the captcha_received of this WafLog.
        The CAPTCHA challenge answer that was received.


        :return: The captcha_received of this WafLog.
        :rtype: str
        r)   rI   rD   rD   rE   r   /  rJ   zWafLog.captcha_receivedc                 C   rK   )z
        Sets the captcha_received of this WafLog.
        The CAPTCHA challenge answer that was received.


        :param captcha_received: The captcha_received of this WafLog.
        :type: str
        NrQ   )rB   r   rD   rD   rE   r   ;  rL   c                 C   rG   )z
        Gets the captcha_fail_count of this WafLog.
        The number of times the CAPTCHA challenge was failed.


        :return: The captcha_fail_count of this WafLog.
        :rtype: str
        r*   rI   rD   rD   rE   r   G  rJ   zWafLog.captcha_fail_countc                 C   rK   )z
        Sets the captcha_fail_count of this WafLog.
        The number of times the CAPTCHA challenge was failed.


        :param captcha_fail_count: The captcha_fail_count of this WafLog.
        :type: str
        NrR   )rB   r   rD   rD   rE   r   S  rL   c                 C   rG   )z
        Gets the client_address of this WafLog.
        The IPv4 address of the requesting client.


        :return: The client_address of this WafLog.
        :rtype: str
        r+   rI   rD   rD   rE   r   _  rJ   zWafLog.client_addressc                 C   rK   )z
        Sets the client_address of this WafLog.
        The IPv4 address of the requesting client.


        :param client_address: The client_address of this WafLog.
        :type: str
        NrS   )rB   r   rD   rD   rE   r   k  rL   c                 C   rG   )z
        Gets the country_name of this WafLog.
        The name of the country where the request originated.


        :return: The country_name of this WafLog.
        :rtype: str
        r,   rI   rD   rD   rE   r   w  rJ   zWafLog.country_namec                 C   rK   )z
        Sets the country_name of this WafLog.
        The name of the country where the request originated.


        :param country_name: The country_name of this WafLog.
        :type: str
        NrT   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )z
        Gets the user_agent of this WafLog.
        The value of the request's `User-Agent` header field.


        :return: The user_agent of this WafLog.
        :rtype: str
        r-   rI   rD   rD   rE   r     rJ   zWafLog.user_agentc                 C   rK   )z
        Sets the user_agent of this WafLog.
        The value of the request's `User-Agent` header field.


        :param user_agent: The user_agent of this WafLog.
        :type: str
        NrU   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )z
        Gets the domain of this WafLog.
        The `Host` header data of the request.


        :return: The domain of this WafLog.
        :rtype: str
        r.   rI   rD   rD   rE   r     rJ   zWafLog.domainc                 C   rK   )z
        Sets the domain of this WafLog.
        The `Host` header data of the request.


        :param domain: The domain of this WafLog.
        :type: str
        NrV   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )al  
        Gets the protection_rule_detections of this WafLog.
        A map of protection rule keys to detection message details. Detections are
        requests that matched the criteria of a protection rule but the rule's
        action was set to `DETECT`.


        :return: The protection_rule_detections of this WafLog.
        :rtype: dict(str, str)
        r/   rI   rD   rD   rE   r        z!WafLog.protection_rule_detectionsc                 C   rK   )a  
        Sets the protection_rule_detections of this WafLog.
        A map of protection rule keys to detection message details. Detections are
        requests that matched the criteria of a protection rule but the rule's
        action was set to `DETECT`.


        :param protection_rule_detections: The protection_rule_detections of this WafLog.
        :type: dict(str, str)
        NrW   )rB   r   rD   rD   rE   r        
c                 C   rG   )z
        Gets the http_method of this WafLog.
        The HTTP method of the request.


        :return: The http_method of this WafLog.
        :rtype: str
        r0   rI   rD   rD   rE   r     rJ   zWafLog.http_methodc                 C   rK   )z
        Sets the http_method of this WafLog.
        The HTTP method of the request.


        :param http_method: The http_method of this WafLog.
        :type: str
        NrZ   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )z
        Gets the request_url of this WafLog.
        The path and query string of the request.


        :return: The request_url of this WafLog.
        :rtype: str
        r1   rI   rD   rD   rE   r     rJ   zWafLog.request_urlc                 C   rK   )z
        Sets the request_url of this WafLog.
        The path and query string of the request.


        :param request_url: The request_url of this WafLog.
        :type: str
        Nr[   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )z
        Gets the http_headers of this WafLog.
        The map of the request's header names to their respective values.


        :return: The http_headers of this WafLog.
        :rtype: dict(str, str)
        r2   rI   rD   rD   rE   r     rJ   zWafLog.http_headersc                 C   rK   )z
        Sets the http_headers of this WafLog.
        The map of the request's header names to their respective values.


        :param http_headers: The http_headers of this WafLog.
        :type: dict(str, str)
        Nr\   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )z
        Gets the referrer of this WafLog.
        The `Referrer` header value of the request.


        :return: The referrer of this WafLog.
        :rtype: str
        r3   rI   rD   rD   rE   r   #  rJ   zWafLog.referrerc                 C   rK   )z
        Sets the referrer of this WafLog.
        The `Referrer` header value of the request.


        :param referrer: The referrer of this WafLog.
        :type: str
        Nr]   )rB   r   rD   rD   rE   r   /  rL   c                 C   rG   )z
        Gets the response_code of this WafLog.
        The status code of the response.


        :return: The response_code of this WafLog.
        :rtype: int
        r4   rI   rD   rD   rE   r   ;  rJ   zWafLog.response_codec                 C   rK   )z
        Sets the response_code of this WafLog.
        The status code of the response.


        :param response_code: The response_code of this WafLog.
        :type: int
        Nr^   )rB   r   rD   rD   rE   r   G  rL   c                 C   rG   )z
        Gets the response_size of this WafLog.
        The size in bytes of the response.


        :return: The response_size of this WafLog.
        :rtype: int
        r5   rI   rD   rD   rE   r   S  rJ   zWafLog.response_sizec                 C   rK   )z
        Sets the response_size of this WafLog.
        The size in bytes of the response.


        :param response_size: The response_size of this WafLog.
        :type: int
        Nr_   )rB   r   rD   rD   rE   r   _  rL   c                 C   rG   )aK  
        Gets the incident_key of this WafLog.
        The incident key of a request. An incident key is generated for
        each request processed by the Web Application Firewall and is used to
        idenitfy blocked requests in applicable logs.


        :return: The incident_key of this WafLog.
        :rtype: str
        r6   rI   rD   rD   rE   r   k  rX   zWafLog.incident_keyc                 C   rK   )aV  
        Sets the incident_key of this WafLog.
        The incident key of a request. An incident key is generated for
        each request processed by the Web Application Firewall and is used to
        idenitfy blocked requests in applicable logs.


        :param incident_key: The incident_key of this WafLog.
        :type: str
        Nr`   )rB   r   rD   rD   rE   r   y  rY   c                 C   rG   )z
        Gets the fingerprint of this WafLog.
        The hashed signature of the device's fingerprint. For more information,
        see `DeviceFingerPrintChallenge`.


        :return: The fingerprint of this WafLog.
        :rtype: str
        r7   rI   rD   rD   rE   r     rN   zWafLog.fingerprintc                 C   rK   )a  
        Sets the fingerprint of this WafLog.
        The hashed signature of the device's fingerprint. For more information,
        see `DeviceFingerPrintChallenge`.


        :param fingerprint: The fingerprint of this WafLog.
        :type: str
        Nra   )rB   r   rD   rD   rE   r     rO   c                 C   rG   )z
        Gets the device of this WafLog.
        The type of device that the request was made from.


        :return: The device of this WafLog.
        :rtype: str
        r8   rI   rD   rD   rE   r     rJ   zWafLog.devicec                 C   rK   )z
        Sets the device of this WafLog.
        The type of device that the request was made from.


        :param device: The device of this WafLog.
        :type: str
        Nrb   )rB   r   rD   rD   rE   r     rL   c                 C   rG   )a:  
        Gets the country_code of this WafLog.
        ISO 3166-1 alpha-2 code of the country from which the request originated.
        For a list of codes, see `ISO's website`__.

        __ https://www.iso.org/obp/ui/#search/code/


        :return: The country_code of this WafLog.
        :rtype: str
        r9   rI   rD   rD   rE   r     s   zWafLog.country_codec                 C   rK   )aE  
        Sets the country_code of this WafLog.
        ISO 3166-1 alpha-2 code of the country from which the request originated.
        For a list of codes, see `ISO's website`__.

        __ https://www.iso.org/obp/ui/#search/code/


        :param country_code: The country_code of this WafLog.
        :type: str
        Nrc   )rB   r   rD   rD   rE   r     s   
c                 C   rG   )a#  
        Gets the request_headers of this WafLog.
        A map of header names to values of the request sent to the origin, including any headers
        appended by the Web Application Firewall.


        :return: The request_headers of this WafLog.
        :rtype: dict(str, str)
        r:   rI   rD   rD   rE   r     rN   zWafLog.request_headersc                 C   rK   )a1  
        Sets the request_headers of this WafLog.
        A map of header names to values of the request sent to the origin, including any headers
        appended by the Web Application Firewall.


        :param request_headers: The request_headers of this WafLog.
        :type: dict(str, str)
        Nrd   )rB   r   rD   rD   rE   r     rO   c                 C   rG   )a  
        Gets the threat_feed_key of this WafLog.
        The `ThreatFeed` key that matched the request. For more information about
        threat feeds, see `UpdateThreatFeeds`.


        :return: The threat_feed_key of this WafLog.
        :rtype: str
        r;   rI   rD   rD   rE   r     rN   zWafLog.threat_feed_keyc                 C   rK   )a  
        Sets the threat_feed_key of this WafLog.
        The `ThreatFeed` key that matched the request. For more information about
        threat feeds, see `UpdateThreatFeeds`.


        :param threat_feed_key: The threat_feed_key of this WafLog.
        :type: str
        Nre   )rB   r   rD   rD   rE   r     rO   c                 C   rG   )a  
        Gets the access_rule_key of this WafLog.
        The `AccessRule` key that matched the request. For more information about
        access rules, see `UpdateAccessRules`.


        :return: The access_rule_key of this WafLog.
        :rtype: str
        r<   rI   rD   rD   rE   r      rN   zWafLog.access_rule_keyc                 C   rK   )a  
        Sets the access_rule_key of this WafLog.
        The `AccessRule` key that matched the request. For more information about
        access rules, see `UpdateAccessRules`.


        :param access_rule_key: The access_rule_key of this WafLog.
        :type: str
        Nrf   )rB   r    rD   rD   rE   r      rO   c                 C   rG   )a7  
        Gets the address_rate_limiting_key of this WafLog.
        The `AddressRateLimiting` key that matched the request. For more information
        about address rate limiting, see `UpdateWafAddressRateLimiting`.


        :return: The address_rate_limiting_key of this WafLog.
        :rtype: str
        r=   rI   rD   rD   rE   r!   %  rN   z WafLog.address_rate_limiting_keyc                 C   rK   )aO  
        Sets the address_rate_limiting_key of this WafLog.
        The `AddressRateLimiting` key that matched the request. For more information
        about address rate limiting, see `UpdateWafAddressRateLimiting`.


        :param address_rate_limiting_key: The address_rate_limiting_key of this WafLog.
        :type: str
        Nrg   )rB   r!   rD   rD   rE   r!   2  rO   c                 C   rG   )z
        Gets the timestamp of this WafLog.
        The date and time the Web Application Firewall processed the request and logged it.


        :return: The timestamp of this WafLog.
        :rtype: datetime
        r>   rI   rD   rD   rE   r"   ?  rJ   zWafLog.timestampc                 C   rK   )z
        Sets the timestamp of this WafLog.
        The date and time the Web Application Firewall processed the request and logged it.


        :param timestamp: The timestamp of this WafLog.
        :type: datetime
        Nrh   )rB   r"   rD   rD   rE   r"   K  rL   c                 C   rG   )a  
        Gets the log_type of this WafLog.
        The type of log of the request. For more about log types, see `Logs`__.

        __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/logs.htm


        :return: The log_type of this WafLog.
        :rtype: str
        r?   rI   rD   rD   rE   r#   W  rX   zWafLog.log_typec                 C   rK   )a  
        Sets the log_type of this WafLog.
        The type of log of the request. For more about log types, see `Logs`__.

        __ https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/logs.htm


        :param log_type: The log_type of this WafLog.
        :type: str
        Nri   )rB   r#   rD   rD   rE   r#   e  rY   c                 C   rG   )z
        Gets the origin_address of this WafLog.
        The address of the origin server where the request was sent.


        :return: The origin_address of this WafLog.
        :rtype: str
        r@   rI   rD   rD   rE   r$   s  rJ   zWafLog.origin_addressc                 C   rK   )z
        Sets the origin_address of this WafLog.
        The address of the origin server where the request was sent.


        :param origin_address: The origin_address of this WafLog.
        :type: str
        Nrj   )rB   r$   rD   rD   rE   r$     rL   c                 C   rG   )z
        Gets the origin_response_time of this WafLog.
        The amount of time it took the origin server to respond to the request, in seconds.


        :return: The origin_response_time of this WafLog.
        :rtype: str
        rA   rI   rD   rD   rE   r%     rJ   zWafLog.origin_response_timec                 C   rK   )z
        Sets the origin_response_time of this WafLog.
        The amount of time it took the origin server to respond to the request, in seconds.


        :param origin_response_time: The origin_response_time of this WafLog.
        :type: str
        Nrk   )rB   r%   rD   rD   rE   r%     rL   c                 C   s   t | S N)r   rI   rD   rD   rE   __repr__  s   zWafLog.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__rB   otherrD   rD   rE   __eq__  s   zWafLog.__eq__c                 C   s
   | |k S rl   rD   ro   rD   rD   rE   __ne__  s   
zWafLog.__ne__N)&__name__
__module____qualname____doc__rF   propertyr   setterr	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   rm   rq   rr   rD   rD   rD   rE   r      s     R























































r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   rD   rD   rD   rE   <module>   s   