o
    ɶdmY                     @   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d Ze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$ed>d? Z%e%jd@d? Z%dAdB Z&dCdD Z'dEdF Z(dGS )HDatabaseInsightz$
    Database insight resource.
    AUTONOMOUS_DATABASEEM_MANAGED_EXTERNAL_DATABASEMACS_MANAGED_EXTERNAL_DATABASEPE_COMANAGED_DATABASEDISABLEDENABLED
TERMINATEDCREATINGUPDATINGACTIVEDELETINGDELETEDFAILEDNEEDS_ATTENTIONc                 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 )a  
        Initializes a new DatabaseInsight object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.opsi.models.EmManagedExternalDatabaseInsight`
        * :class:`~oci.opsi.models.MacsManagedExternalDatabaseInsight`
        * :class:`~oci.opsi.models.PeComanagedDatabaseInsight`
        * :class:`~oci.opsi.models.AutonomousDatabaseInsight`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param entity_source:
            The value to assign to the entity_source property of this DatabaseInsight.
            Allowed values for this property are: "AUTONOMOUS_DATABASE", "EM_MANAGED_EXTERNAL_DATABASE", "MACS_MANAGED_EXTERNAL_DATABASE", "PE_COMANAGED_DATABASE", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type entity_source: str

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

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

        :param status:
            The value to assign to the status property of this DatabaseInsight.
            Allowed values for this property are: "DISABLED", "ENABLED", "TERMINATED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type status: str

        :param database_type:
            The value to assign to the database_type property of this DatabaseInsight.
        :type database_type: str

        :param database_version:
            The value to assign to the database_version property of this DatabaseInsight.
        :type database_version: str

        :param processor_count:
            The value to assign to the processor_count property of this DatabaseInsight.
        :type processor_count: int

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

        :param defined_tags:
            The value to assign to the defined_tags property of this DatabaseInsight.
        :type defined_tags: dict(str, dict(str, object))

        :param system_tags:
            The value to assign to the system_tags property of this DatabaseInsight.
        :type system_tags: dict(str, dict(str, object))

        :param time_created:
            The value to assign to the time_created property of this DatabaseInsight.
        :type time_created: datetime

        :param time_updated:
            The value to assign to the time_updated property of this DatabaseInsight.
        :type time_updated: datetime

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

        :param lifecycle_details:
            The value to assign to the lifecycle_details property of this DatabaseInsight.
        :type lifecycle_details: str

        :param database_connection_status_details:
            The value to assign to the database_connection_status_details property of this DatabaseInsight.
        :type database_connection_status_details: str

        strintzdict(str, str)zdict(str, dict(str, object))datetime)entity_sourceidcompartment_idstatusdatabase_typedatabase_versionprocessor_countfreeform_tagsdefined_tagssystem_tagstime_createdtime_updatedlifecycle_statelifecycle_details"database_connection_status_detailsentitySourcer   ZcompartmentIdr   ZdatabaseTypeZdatabaseVersionZprocessorCountZfreeformTagsZdefinedTagsZ
systemTagsZtimeCreatedZtimeUpdatedZlifecycleStateZlifecycleDetailsZdatabaseConnectionStatusDetailsN)Zswagger_typesZattribute_map_entity_source_id_compartment_id_status_database_type_database_version_processor_count_freeform_tags_defined_tags_system_tags_time_created_time_updated_lifecycle_state_lifecycle_details#_database_connection_status_details)selfkwargs r9   Dusr/lib/python3.10/site-packages/oci/opsi/models/database_insight.py__init__J   s^   P
zDatabaseInsight.__init__c                 C   s<   | d }|dkr
dS |dkrdS |dkrdS |dkrd	S d
S )z
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        r'   r   Z EmManagedExternalDatabaseInsightr	   Z"MacsManagedExternalDatabaseInsightr
   ZPeComanagedDatabaseInsightr   ZAutonomousDatabaseInsightr   r9   )Zobject_dictionarytyper9   r9   r:   get_subtype   s   zDatabaseInsight.get_subtypec                 C      | j S )a  
        **[Required]** Gets the entity_source of this DatabaseInsight.
        Source of the database entity.

        Allowed values for this property are: "AUTONOMOUS_DATABASE", "EM_MANAGED_EXTERNAL_DATABASE", "MACS_MANAGED_EXTERNAL_DATABASE", "PE_COMANAGED_DATABASE", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The entity_source of this DatabaseInsight.
        :rtype: str
        )r(   r7   r9   r9   r:   r         zDatabaseInsight.entity_sourcec                 C       g d}t ||sd}|| _dS )z
        Sets the entity_source of this DatabaseInsight.
        Source of the database entity.


        :param entity_source: The entity_source of this DatabaseInsight.
        :type: str
        )r   r   r	   r
   UNKNOWN_ENUM_VALUEN)r   r(   )r7   r   allowed_valuesr9   r9   r:   r         


c                 C   r>   )z
        **[Required]** Gets the id of this DatabaseInsight.
        Database insight identifier


        :return: The id of this DatabaseInsight.
        :rtype: str
        r)   r?   r9   r9   r:   r        
zDatabaseInsight.idc                 C   
   || _ dS )z
        Sets the id of this DatabaseInsight.
        Database insight identifier


        :param id: The id of this DatabaseInsight.
        :type: str
        NrE   )r7   r   r9   r9   r:   r        

c                 C   r>   )z
        **[Required]** Gets the compartment_id of this DatabaseInsight.
        Compartment identifier of the database


        :return: The compartment_id of this DatabaseInsight.
        :rtype: str
        r*   r?   r9   r9   r:   r     rF   zDatabaseInsight.compartment_idc                 C   rG   )z
        Sets the compartment_id of this DatabaseInsight.
        Compartment identifier of the database


        :param compartment_id: The compartment_id of this DatabaseInsight.
        :type: str
        NrI   )r7   r   r9   r9   r:   r   %  rH   c                 C   r>   )a  
        **[Required]** Gets the status of this DatabaseInsight.
        Indicates the status of a database insight in Operations Insights

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


        :return: The status of this DatabaseInsight.
        :rtype: str
        )r+   r?   r9   r9   r:   r   1  r@   zDatabaseInsight.statusc                 C   rA   )z
        Sets the status of this DatabaseInsight.
        Indicates the status of a database insight in Operations Insights


        :param status: The status of this DatabaseInsight.
        :type: str
        )r   r   r   rB   N)r   r+   )r7   r   rC   r9   r9   r:   r   @  rD   c                 C   r>   )z
        Gets the database_type of this DatabaseInsight.
        Operations Insights internal representation of the database type.


        :return: The database_type of this DatabaseInsight.
        :rtype: str
        r,   r?   r9   r9   r:   r   O  rF   zDatabaseInsight.database_typec                 C   rG   )z
        Sets the database_type of this DatabaseInsight.
        Operations Insights internal representation of the database type.


        :param database_type: The database_type of this DatabaseInsight.
        :type: str
        NrJ   )r7   r   r9   r9   r:   r   [  rH   c                 C   r>   )z
        Gets the database_version of this DatabaseInsight.
        The version of the database.


        :return: The database_version of this DatabaseInsight.
        :rtype: str
        r-   r?   r9   r9   r:   r   g  rF   z DatabaseInsight.database_versionc                 C   rG   )z
        Sets the database_version of this DatabaseInsight.
        The version of the database.


        :param database_version: The database_version of this DatabaseInsight.
        :type: str
        NrK   )r7   r   r9   r9   r:   r   s  rH   c                 C   r>   )a  
        Gets the processor_count of this DatabaseInsight.
        Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types.


        :return: The processor_count of this DatabaseInsight.
        :rtype: int
        r.   r?   r9   r9   r:   r     rF   zDatabaseInsight.processor_countc                 C   rG   )a  
        Sets the processor_count of this DatabaseInsight.
        Processor count. This is the OCPU count for Autonomous Database and CPU core count for other database types.


        :param processor_count: The processor_count of this DatabaseInsight.
        :type: int
        NrL   )r7   r   r9   r9   r:   r     rH   c                 C   r>   )aT  
        **[Required]** Gets the freeform_tags of this DatabaseInsight.
        Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
        Example: `{"bar-key": "value"}`


        :return: The freeform_tags of this DatabaseInsight.
        :rtype: dict(str, str)
        r/   r?   r9   r9   r:   r        zDatabaseInsight.freeform_tagsc                 C   rG   )aQ  
        Sets the freeform_tags of this DatabaseInsight.
        Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
        Example: `{"bar-key": "value"}`


        :param freeform_tags: The freeform_tags of this DatabaseInsight.
        :type: dict(str, str)
        NrM   )r7   r   r9   r9   r:   r        
c                 C   r>   )aN  
        **[Required]** Gets the defined_tags of this DatabaseInsight.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{"foo-namespace": {"bar-key": "value"}}`


        :return: The defined_tags of this DatabaseInsight.
        :rtype: dict(str, dict(str, object))
        r0   r?   r9   r9   r:   r      rN   zDatabaseInsight.defined_tagsc                 C   rG   )aJ  
        Sets the defined_tags of this DatabaseInsight.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{"foo-namespace": {"bar-key": "value"}}`


        :param defined_tags: The defined_tags of this DatabaseInsight.
        :type: dict(str, dict(str, object))
        NrP   )r7   r    r9   r9   r:   r      rO   c                 C   r>   )aC  
        Gets the system_tags of this DatabaseInsight.
        System tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`


        :return: The system_tags of this DatabaseInsight.
        :rtype: dict(str, dict(str, object))
        r1   r?   r9   r9   r:   r!     rN   zDatabaseInsight.system_tagsc                 C   rG   )aM  
        Sets the system_tags of this DatabaseInsight.
        System tags for this resource. Each key is predefined and scoped to a namespace.
        Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`


        :param system_tags: The system_tags of this DatabaseInsight.
        :type: dict(str, dict(str, object))
        NrQ   )r7   r!   r9   r9   r:   r!     rO   c                 C   r>   )a  
        **[Required]** Gets the time_created of this DatabaseInsight.
        The time the the database insight was first enabled. An RFC3339 formatted datetime string


        :return: The time_created of this DatabaseInsight.
        :rtype: datetime
        r2   r?   r9   r9   r:   r"     rF   zDatabaseInsight.time_createdc                 C   rG   )a  
        Sets the time_created of this DatabaseInsight.
        The time the the database insight was first enabled. An RFC3339 formatted datetime string


        :param time_created: The time_created of this DatabaseInsight.
        :type: datetime
        NrR   )r7   r"   r9   r9   r:   r"     rH   c                 C   r>   )z
        Gets the time_updated of this DatabaseInsight.
        The time the database insight was updated. An RFC3339 formatted datetime string


        :return: The time_updated of this DatabaseInsight.
        :rtype: datetime
        r3   r?   r9   r9   r:   r#     rF   zDatabaseInsight.time_updatedc                 C   rG   )z
        Sets the time_updated of this DatabaseInsight.
        The time the database insight was updated. An RFC3339 formatted datetime string


        :param time_updated: The time_updated of this DatabaseInsight.
        :type: datetime
        NrS   )r7   r#   r9   r9   r:   r#   	  rH   c                 C   r>   )a  
        **[Required]** Gets the lifecycle_state of this DatabaseInsight.
        The current state of the database.

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


        :return: The lifecycle_state of this DatabaseInsight.
        :rtype: str
        )r4   r?   r9   r9   r:   r$     r@   zDatabaseInsight.lifecycle_statec                 C   rA   )z
        Sets the lifecycle_state of this DatabaseInsight.
        The current state of the database.


        :param lifecycle_state: The lifecycle_state of this DatabaseInsight.
        :type: str
        )r   r   r   r   r   r   r   rB   N)r   r4   )r7   r$   rC   r9   r9   r:   r$   $  rD   c                 C   r>   )a5  
        Gets the lifecycle_details of this DatabaseInsight.
        A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.


        :return: The lifecycle_details of this DatabaseInsight.
        :rtype: str
        r5   r?   r9   r9   r:   r%   3  rF   z!DatabaseInsight.lifecycle_detailsc                 C   rG   )aE  
        Sets the lifecycle_details of this DatabaseInsight.
        A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.


        :param lifecycle_details: The lifecycle_details of this DatabaseInsight.
        :type: str
        NrT   )r7   r%   r9   r9   r:   r%   ?  rH   c                 C   r>   )a  
        Gets the database_connection_status_details of this DatabaseInsight.
        A message describing the status of the database connection of this resource. For example, it can be used to provide actionable information about the permission and content validity of the database connection.


        :return: The database_connection_status_details of this DatabaseInsight.
        :rtype: str
        r6   r?   r9   r9   r:   r&   K  rF   z2DatabaseInsight.database_connection_status_detailsc                 C   rG   )a  
        Sets the database_connection_status_details of this DatabaseInsight.
        A message describing the status of the database connection of this resource. For example, it can be used to provide actionable information about the permission and content validity of the database connection.


        :param database_connection_status_details: The database_connection_status_details of this DatabaseInsight.
        :type: str
        NrU   )r7   r&   r9   r9   r:   r&   W  rH   c                 C   s   t | S N)r   r?   r9   r9   r:   __repr__c  s   zDatabaseInsight.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r7   otherr9   r9   r:   __eq__f  s   zDatabaseInsight.__eq__c                 C   s
   | |k S rV   r9   rY   r9   r9   r:   __ne__l  s   
zDatabaseInsight.__ne__N))__name__
__module____qualname____doc__Z!ENTITY_SOURCE_AUTONOMOUS_DATABASEZ*ENTITY_SOURCE_EM_MANAGED_EXTERNAL_DATABASEZ,ENTITY_SOURCE_MACS_MANAGED_EXTERNAL_DATABASEZ#ENTITY_SOURCE_PE_COMANAGED_DATABASEZSTATUS_DISABLEDZSTATUS_ENABLEDZSTATUS_TERMINATEDZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_UPDATINGZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZLIFECYCLE_STATE_FAILEDZLIFECYCLE_STATE_NEEDS_ATTENTIONr;   staticmethodr=   propertyr   setterr   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   rW   r[   r\   r9   r9   r9   r:   r      s     






























r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r9   r9   r9   r:   <module>   s   