o
    ɶdL                     @   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ZdZdZdZ	dZ
d	Zd
ZdZdZd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ed)d* Zejd+d* Zed,d- Zejd.d- Zed/d0 Z e jd1d0 Z ed2d3 Z!e!jd4d3 Z!ed5d6 Z"e"jd7d6 Z"ed8d9 Z#e#jd:d9 Z#ed;d< Z$e$jd=d< Z$d>d? Z%d@dA Z&dBdC Z'dDS )EVulnerabilityz;
    A vulnerability found from scans in a compartment
    NONELOWMEDIUMHIGHCRITICALOPENFIXEDNOT_APPLICABLECVEPROBLEMCREATINGUPDATINGACTIVEDELETINGDELETEDFAILEDc                 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S )a  
        Initializes a new Vulnerability object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param id:
            The value to assign to the id property of this Vulnerability.
        :type id: str

        :param compartment_id:
            The value to assign to the compartment_id property of this Vulnerability.
        :type compartment_id: str

        :param authentication:
            The value to assign to the authentication property of this Vulnerability.
        :type authentication: str

        :param vulnerability_reference:
            The value to assign to the vulnerability_reference property of this Vulnerability.
        :type vulnerability_reference: str

        :param cve_details:
            The value to assign to the cve_details property of this Vulnerability.
        :type cve_details: oci.vulnerability_scanning.models.CveDetails

        :param severity:
            The value to assign to the severity property of this Vulnerability.
            Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type severity: str

        :param state:
            The value to assign to the state property of this Vulnerability.
            Allowed values for this property are: "OPEN", "FIXED", "NOT_APPLICABLE", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type state: str

        :param cve_description:
            The value to assign to the cve_description property of this Vulnerability.
        :type cve_description: str

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

        :param time_last_detected:
            The value to assign to the time_last_detected property of this Vulnerability.
        :type time_last_detected: datetime

        :param time_first_detected:
            The value to assign to the time_first_detected property of this Vulnerability.
        :type time_first_detected: datetime

        :param impacted_resources_count:
            The value to assign to the impacted_resources_count property of this Vulnerability.
        :type impacted_resources_count: oci.vulnerability_scanning.models.ImpactedResourcesCount

        :param vulnerability_type:
            The value to assign to the vulnerability_type property of this Vulnerability.
            Allowed values for this property are: "CVE", "PROBLEM", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type vulnerability_type: str

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Vulnerability.
            Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        strZ
CveDetailsdatetimeZImpactedResourcesCount)idcompartment_idauthenticationvulnerability_referencecve_detailsseveritystatecve_descriptionnametime_last_detectedtime_first_detectedimpacted_resources_countvulnerability_typelifecycle_stater   ZcompartmentIdr   ZvulnerabilityReferenceZ
cveDetailsr   r   ZcveDescriptionr!   ZtimeLastDetectedZtimeFirstDetectedZimpactedResourcesCountZvulnerabilityTypeZlifecycleStateN)Zswagger_typesZattribute_map_id_compartment_id_authentication_vulnerability_reference_cve_details	_severity_state_cve_description_name_time_last_detected_time_first_detected_impacted_resources_count_vulnerability_type_lifecycle_state)selfkwargs r7   Susr/lib/python3.10/site-packages/oci/vulnerability_scanning/models/vulnerability.py__init__R   sX   G
zVulnerability.__init__c                 C      | j S )z
        **[Required]** Gets the id of this Vulnerability.
        ID of the vulnerability


        :return: The id of this Vulnerability.
        :rtype: str
        r'   r5   r7   r7   r8   r         
zVulnerability.idc                 C   
   || _ dS )z
        Sets the id of this Vulnerability.
        ID of the vulnerability


        :param id: The id of this Vulnerability.
        :type: str
        Nr;   )r5   r   r7   r7   r8   r         

c                 C   r:   )a4  
        **[Required]** Gets the compartment_id of this Vulnerability.
        Compartment ID of the vulnerability. Vulnerabilities with identical CVEs can exist in different compartments, based on scan target location


        :return: The compartment_id of this Vulnerability.
        :rtype: str
        r(   r<   r7   r7   r8   r      r=   zVulnerability.compartment_idc                 C   r>   )a2  
        Sets the compartment_id of this Vulnerability.
        Compartment ID of the vulnerability. Vulnerabilities with identical CVEs can exist in different compartments, based on scan target location


        :param compartment_id: The compartment_id of this Vulnerability.
        :type: str
        Nr@   )r5   r   r7   r7   r8   r      r?   c                 C   r:   )z
        Gets the authentication of this Vulnerability.
        Mechanism used for scan authentication


        :return: The authentication of this Vulnerability.
        :rtype: str
        r)   r<   r7   r7   r8   r      r=   zVulnerability.authenticationc                 C   r>   )z
        Sets the authentication of this Vulnerability.
        Mechanism used for scan authentication


        :param authentication: The authentication of this Vulnerability.
        :type: str
        NrA   )r5   r   r7   r7   r8   r     r?   c                 C   r:   )a  
        Gets the vulnerability_reference of this Vulnerability.
        Reference to the vulnerability type's unique identifier. For CVE, this is the MITRE CVE ID


        :return: The vulnerability_reference of this Vulnerability.
        :rtype: str
        r*   r<   r7   r7   r8   r     r=   z%Vulnerability.vulnerability_referencec                 C   r>   )a  
        Sets the vulnerability_reference of this Vulnerability.
        Reference to the vulnerability type's unique identifier. For CVE, this is the MITRE CVE ID


        :param vulnerability_reference: The vulnerability_reference of this Vulnerability.
        :type: str
        NrB   )r5   r   r7   r7   r8   r     r?   c                 C   r:   )z
        Gets the cve_details of this Vulnerability.

        :return: The cve_details of this Vulnerability.
        :rtype: oci.vulnerability_scanning.models.CveDetails
        r+   r<   r7   r7   r8   r   )     zVulnerability.cve_detailsc                 C   r>   )z
        Sets the cve_details of this Vulnerability.

        :param cve_details: The cve_details of this Vulnerability.
        :type: oci.vulnerability_scanning.models.CveDetails
        NrC   )r5   r   r7   r7   r8   r   3     
c                 C   r:   )a  
        **[Required]** Gets the severity of this Vulnerability.
        Severity of the vulnerability

        Allowed values for this property are: "NONE", "LOW", "MEDIUM", "HIGH", "CRITICAL", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The severity of this Vulnerability.
        :rtype: str
        )r,   r<   r7   r7   r8   r   =     zVulnerability.severityc                 C       g d}t ||sd}|| _dS )z
        Sets the severity of this Vulnerability.
        Severity of the vulnerability


        :param severity: The severity of this Vulnerability.
        :type: str
        )r   r   r	   r
   r   UNKNOWN_ENUM_VALUEN)r   r,   )r5   r   allowed_valuesr7   r7   r8   r   L     


c                 C   r:   )ah  
        Gets the state of this Vulnerability.
        State of the vulnerability

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


        :return: The state of this Vulnerability.
        :rtype: str
        )r-   r<   r7   r7   r8   r   [  rF   zVulnerability.statec                 C   rG   )z
        Sets the state of this Vulnerability.
        State of the vulnerability


        :param state: The state of this Vulnerability.
        :type: str
        )r   r   r   rH   N)r   r-   )r5   r   rI   r7   r7   r8   r   j  rJ   c                 C   r:   )z
        Gets the cve_description of this Vulnerability.
        The description of CVE vulnerability


        :return: The cve_description of this Vulnerability.
        :rtype: str
        r.   r<   r7   r7   r8   r    y  r=   zVulnerability.cve_descriptionc                 C   r>   )z
        Sets the cve_description of this Vulnerability.
        The description of CVE vulnerability


        :param cve_description: The cve_description of this Vulnerability.
        :type: str
        NrK   )r5   r    r7   r7   r8   r      r?   c                 C   r:   )z
        **[Required]** Gets the name of this Vulnerability.
        Vulnerability name


        :return: The name of this Vulnerability.
        :rtype: str
        r/   r<   r7   r7   r8   r!     r=   zVulnerability.namec                 C   r>   )z
        Sets the name of this Vulnerability.
        Vulnerability name


        :param name: The name of this Vulnerability.
        :type: str
        NrL   )r5   r!   r7   r7   r8   r!     r?   c                 C   r:   )z
        **[Required]** Gets the time_last_detected of this Vulnerability.
        Date of scan result that most recently reported the vulnerability


        :return: The time_last_detected of this Vulnerability.
        :rtype: datetime
        r0   r<   r7   r7   r8   r"     r=   z Vulnerability.time_last_detectedc                 C   r>   )z
        Sets the time_last_detected of this Vulnerability.
        Date of scan result that most recently reported the vulnerability


        :param time_last_detected: The time_last_detected of this Vulnerability.
        :type: datetime
        NrM   )r5   r"   r7   r7   r8   r"     r?   c                 C   r:   )z
        **[Required]** Gets the time_first_detected of this Vulnerability.
        Date of scan result that first reported the vulnerability


        :return: The time_first_detected of this Vulnerability.
        :rtype: datetime
        r1   r<   r7   r7   r8   r#     r=   z!Vulnerability.time_first_detectedc                 C   r>   )z
        Sets the time_first_detected of this Vulnerability.
        Date of scan result that first reported the vulnerability


        :param time_first_detected: The time_first_detected of this Vulnerability.
        :type: datetime
        NrN   )r5   r#   r7   r7   r8   r#     r?   c                 C   r:   )z
        **[Required]** Gets the impacted_resources_count of this Vulnerability.

        :return: The impacted_resources_count of this Vulnerability.
        :rtype: oci.vulnerability_scanning.models.ImpactedResourcesCount
        r2   r<   r7   r7   r8   r$     rD   z&Vulnerability.impacted_resources_countc                 C   r>   )z
        Sets the impacted_resources_count of this Vulnerability.

        :param impacted_resources_count: The impacted_resources_count of this Vulnerability.
        :type: oci.vulnerability_scanning.models.ImpactedResourcesCount
        NrO   )r5   r$   r7   r7   r8   r$     rE   c                 C   r:   )a  
        **[Required]** Gets the vulnerability_type of this Vulnerability.
        Specifies the type of Vulnerability

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


        :return: The vulnerability_type of this Vulnerability.
        :rtype: str
        )r3   r<   r7   r7   r8   r%     rF   z Vulnerability.vulnerability_typec                 C   s    ddg}t ||sd}|| _dS )z
        Sets the vulnerability_type of this Vulnerability.
        Specifies the type of Vulnerability


        :param vulnerability_type: The vulnerability_type of this Vulnerability.
        :type: str
        r   r   rH   N)r   r3   )r5   r%   rI   r7   r7   r8   r%     rJ   c                 C   r:   )a  
        Gets the lifecycle_state of this Vulnerability.
        The current state of the resource.

        Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this Vulnerability.
        :rtype: str
        )r4   r<   r7   r7   r8   r&     rF   zVulnerability.lifecycle_statec                 C   rG   )z
        Sets the lifecycle_state of this Vulnerability.
        The current state of the resource.


        :param lifecycle_state: The lifecycle_state of this Vulnerability.
        :type: str
        )r   r   r   r   r   r   rH   N)r   r4   )r5   r&   rI   r7   r7   r8   r&     rJ   c                 C   s   t | S N)r   r<   r7   r7   r8   __repr__)  s   zVulnerability.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r5   otherr7   r7   r8   __eq__,  s   zVulnerability.__eq__c                 C   s
   | |k S rP   r7   rS   r7   r7   r8   __ne__2  s   
zVulnerability.__ne__N)(__name__
__module____qualname____doc__ZSEVERITY_NONEZSEVERITY_LOWZSEVERITY_MEDIUMZSEVERITY_HIGHZSEVERITY_CRITICALZ
STATE_OPENZSTATE_FIXEDZSTATE_NOT_APPLICABLEZVULNERABILITY_TYPE_CVEZVULNERABILITY_TYPE_PROBLEMZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_UPDATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDr9   propertyr   setterr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   rQ   rU   rV   r7   r7   r7   r8   r      s    w








	
	












	
	



r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r7   r7   r7   r8   <module>   s   