o
    ɶdU                     @   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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+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#dCdD Z$dEdF Z%dGdH Z&dIS )JJobz!
    The details of the job.
    CDBPDBNON_CDBACDADB	IMMEDIATELATERSQLACTIVEINACTIVEc                 K   sB  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| _ 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$| _d$| _d$| _d$| _d$| _d$| _d$S )%a  
        Initializes a new Job 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.database_management.models.SqlJob`

        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 Job.
        :type id: str

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

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

        :param description:
            The value to assign to the description property of this Job.
        :type description: str

        :param managed_database_group_id:
            The value to assign to the managed_database_group_id property of this Job.
        :type managed_database_group_id: str

        :param managed_database_id:
            The value to assign to the managed_database_id property of this Job.
        :type managed_database_id: str

        :param managed_databases_details:
            The value to assign to the managed_databases_details property of this Job.
        :type managed_databases_details: list[oci.database_management.models.JobDatabase]

        :param database_sub_type:
            The value to assign to the database_sub_type property of this Job.
            Allowed values for this property are: "CDB", "PDB", "NON_CDB", "ACD", "ADB", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type database_sub_type: str

        :param schedule_type:
            The value to assign to the schedule_type property of this Job.
            Allowed values for this property are: "IMMEDIATE", "LATER", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type schedule_type: str

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

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

        :param timeout:
            The value to assign to the timeout property of this Job.
        :type timeout: str

        :param result_location:
            The value to assign to the result_location property of this Job.
        :type result_location: oci.database_management.models.JobExecutionResultLocation

        :param schedule_details:
            The value to assign to the schedule_details property of this Job.
        :type schedule_details: oci.database_management.models.JobScheduleDetails

        :param submission_error_message:
            The value to assign to the submission_error_message property of this Job.
        :type submission_error_message: str

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

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

        idstrcompartment_idnamedescriptionmanaged_database_group_idmanaged_database_idmanaged_databases_detailszlist[JobDatabase]database_sub_typeschedule_typejob_typelifecycle_statetimeoutresult_locationZJobExecutionResultLocationschedule_detailsZJobScheduleDetailssubmission_error_messagetime_createddatetimetime_updatedZcompartmentIdZmanagedDatabaseGroupIdZmanagedDatabaseIdZmanagedDatabasesDetailsZdatabaseSubTypeZscheduleTypejobTypeZlifecycleStateZresultLocationZscheduleDetailsZsubmissionErrorMessageZtimeCreatedZtimeUpdatedN)Zswagger_typesZattribute_map_id_compartment_id_name_description_managed_database_group_id_managed_database_id_managed_databases_details_database_sub_type_schedule_type	_job_type_lifecycle_state_timeout_result_location_schedule_details_submission_error_message_time_created_time_updated)selfkwargs r8   Fusr/lib/python3.10/site-packages/oci/database_management/models/job.py__init__:   s   V	
	

zJob.__init__c                 C   s   | d }|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SqlJobr   r8   )Zobject_dictionarytyper8   r8   r9   get_subtype   s   zJob.get_subtypec                 C      | j S )z
        **[Required]** Gets the id of this Job.
        The `OCID`__ of the job.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :return: The id of this Job.
        :rtype: str
        r%   r6   r8   r8   r9   r         zJob.idc                 C   
   || _ dS )z
        Sets the id of this Job.
        The `OCID`__ of the job.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :param id: The id of this Job.
        :type: str
        Nr>   )r6   r   r8   r8   r9   r         
c                 C   r=   )a!  
        **[Required]** Gets the compartment_id of this Job.
        The `OCID`__ of the compartment in which the job resides.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :return: The compartment_id of this Job.
        :rtype: str
        r&   r?   r8   r8   r9   r      r@   zJob.compartment_idc                 C   rA   )a  
        Sets the compartment_id of this Job.
        The `OCID`__ of the compartment in which the job resides.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :param compartment_id: The compartment_id of this Job.
        :type: str
        NrC   )r6   r   r8   r8   r9   r     rB   c                 C   r=   )z
        **[Required]** Gets the name of this Job.
        The display name of the job.


        :return: The name of this Job.
        :rtype: str
        r'   r?   r8   r8   r9   r        
zJob.namec                 C   rA   )z
        Sets the name of this Job.
        The display name of the job.


        :param name: The name of this Job.
        :type: str
        NrD   )r6   r   r8   r8   r9   r        

c                 C   r=   )z
        Gets the description of this Job.
        The description of the job.


        :return: The description of this Job.
        :rtype: str
        r(   r?   r8   r8   r9   r   '  rE   zJob.descriptionc                 C   rA   )z
        Sets the description of this Job.
        The description of the job.


        :param description: The description of this Job.
        :type: str
        NrG   )r6   r   r8   r8   r9   r   3  rF   c                 C   r=   )a;  
        Gets the managed_database_group_id of this Job.
        The `OCID`__ of the Managed Database Group where the job has to be executed.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :return: The managed_database_group_id of this Job.
        :rtype: str
        r)   r?   r8   r8   r9   r   ?  r@   zJob.managed_database_group_idc                 C   rA   )aS  
        Sets the managed_database_group_id of this Job.
        The `OCID`__ of the Managed Database Group where the job has to be executed.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :param managed_database_group_id: The managed_database_group_id of this Job.
        :type: str
        NrH   )r6   r   r8   r8   r9   r   M  rB   c                 C   r=   )a)  
        Gets the managed_database_id of this Job.
        The `OCID`__ of the Managed Database where the job has to be executed.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :return: The managed_database_id of this Job.
        :rtype: str
        r*   r?   r8   r8   r9   r   [  r@   zJob.managed_database_idc                 C   rA   )a;  
        Sets the managed_database_id of this Job.
        The `OCID`__ of the Managed Database where the job has to be executed.

        __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm


        :param managed_database_id: The managed_database_id of this Job.
        :type: str
        NrI   )r6   r   r8   r8   r9   r   i  rB   c                 C   r=   )a  
        Gets the managed_databases_details of this Job.
        The details of the Managed Databases where the job has to be executed.


        :return: The managed_databases_details of this Job.
        :rtype: list[oci.database_management.models.JobDatabase]
        r+   r?   r8   r8   r9   r   w  rE   zJob.managed_databases_detailsc                 C   rA   )a'  
        Sets the managed_databases_details of this Job.
        The details of the Managed Databases where the job has to be executed.


        :param managed_databases_details: The managed_databases_details of this Job.
        :type: list[oci.database_management.models.JobDatabase]
        NrJ   )r6   r   r8   r8   r9   r     rF   c                 C   r=   )a  
        Gets the database_sub_type of this Job.
        The subtype of the Oracle Database where the job has to be executed. Applicable only when managedDatabaseGroupId is provided.

        Allowed values for this property are: "CDB", "PDB", "NON_CDB", "ACD", "ADB", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The database_sub_type of this Job.
        :rtype: str
        )r,   r?   r8   r8   r9   r        zJob.database_sub_typec                 C   s    g d}t ||sd}|| _dS )a  
        Sets the database_sub_type of this Job.
        The subtype of the Oracle Database where the job has to be executed. Applicable only when managedDatabaseGroupId is provided.


        :param database_sub_type: The database_sub_type of this Job.
        :type: str
        )r   r   r	   r
   r   UNKNOWN_ENUM_VALUEN)r   r,   )r6   r   allowed_valuesr8   r8   r9   r        


c                 C   r=   )ai  
        **[Required]** Gets the schedule_type of this Job.
        The schedule type of the job.

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


        :return: The schedule_type of this Job.
        :rtype: str
        )r-   r?   r8   r8   r9   r     rK   zJob.schedule_typec                 C       ddg}t ||sd}|| _dS )z
        Sets the schedule_type of this Job.
        The schedule type of the job.


        :param schedule_type: The schedule_type of this Job.
        :type: str
        r   r   rL   N)r   r-   )r6   r   rM   r8   r8   r9   r     rN   c                 C   r=   )aC  
        **[Required]** Gets the job_type of this Job.
        The type of job.

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


        :return: The job_type of this Job.
        :rtype: str
        )r.   r?   r8   r8   r9   r     rK   zJob.job_typec                 C   s   dg}t ||s
d}|| _dS )z
        Sets the job_type of this Job.
        The type of job.


        :param job_type: The job_type of this Job.
        :type: str
        r   rL   N)r   r.   )r6   r   rM   r8   r8   r9   r     s   


c                 C   r=   )ao  
        **[Required]** Gets the lifecycle_state of this Job.
        The lifecycle state of the job.

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


        :return: The lifecycle_state of this Job.
        :rtype: str
        )r/   r?   r8   r8   r9   r     rK   zJob.lifecycle_statec                 C   rO   )z
        Sets the lifecycle_state of this Job.
        The lifecycle state of the job.


        :param lifecycle_state: The lifecycle_state of this Job.
        :type: str
        r   r   rL   N)r   r/   )r6   r   rM   r8   r8   r9   r     rN   c                 C   r=   )z
        Gets the timeout of this Job.
        The job timeout duration, which is expressed like "1h 10m 15s".


        :return: The timeout of this Job.
        :rtype: str
        r0   r?   r8   r8   r9   r     rE   zJob.timeoutc                 C   rA   )z
        Sets the timeout of this Job.
        The job timeout duration, which is expressed like "1h 10m 15s".


        :param timeout: The timeout of this Job.
        :type: str
        NrP   )r6   r   r8   r8   r9   r     rF   c                 C   r=   )z
        Gets the result_location of this Job.

        :return: The result_location of this Job.
        :rtype: oci.database_management.models.JobExecutionResultLocation
        r1   r?   r8   r8   r9   r        zJob.result_locationc                 C   rA   )z
        Sets the result_location of this Job.

        :param result_location: The result_location of this Job.
        :type: oci.database_management.models.JobExecutionResultLocation
        NrQ   )r6   r   r8   r8   r9   r   )     
c                 C   r=   )z
        Gets the schedule_details of this Job.

        :return: The schedule_details of this Job.
        :rtype: oci.database_management.models.JobScheduleDetails
        r2   r?   r8   r8   r9   r   3  rR   zJob.schedule_detailsc                 C   rA   )z
        Sets the schedule_details of this Job.

        :param schedule_details: The schedule_details of this Job.
        :type: oci.database_management.models.JobScheduleDetails
        NrT   )r6   r   r8   r8   r9   r   =  rS   c                 C   r=   )a  
        Gets the submission_error_message of this Job.
        The error message that is returned if the job submission fails. Null is returned in all other scenarios.


        :return: The submission_error_message of this Job.
        :rtype: str
        r3   r?   r8   r8   r9   r    G  rE   zJob.submission_error_messagec                 C   rA   )a  
        Sets the submission_error_message of this Job.
        The error message that is returned if the job submission fails. Null is returned in all other scenarios.


        :param submission_error_message: The submission_error_message of this Job.
        :type: str
        NrU   )r6   r    r8   r8   r9   r    S  rF   c                 C   r=   )z
        **[Required]** Gets the time_created of this Job.
        The date and time when the job was created.


        :return: The time_created of this Job.
        :rtype: datetime
        r4   r?   r8   r8   r9   r!   _  rE   zJob.time_createdc                 C   rA   )z
        Sets the time_created of this Job.
        The date and time when the job was created.


        :param time_created: The time_created of this Job.
        :type: datetime
        NrV   )r6   r!   r8   r8   r9   r!   k  rF   c                 C   r=   )z
        **[Required]** Gets the time_updated of this Job.
        The date and time when the job was last updated.


        :return: The time_updated of this Job.
        :rtype: datetime
        r5   r?   r8   r8   r9   r#   w  rE   zJob.time_updatedc                 C   rA   )z
        Sets the time_updated of this Job.
        The date and time when the job was last updated.


        :param time_updated: The time_updated of this Job.
        :type: datetime
        NrW   )r6   r#   r8   r8   r9   r#     rF   c                 C   s   t | S N)r   r?   r8   r8   r9   __repr__  s   zJob.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r6   otherr8   r8   r9   __eq__  s   z
Job.__eq__c                 C   s
   | |k S rX   r8   r[   r8   r8   r9   __ne__  s   
z
Job.__ne__N)'__name__
__module____qualname____doc__ZDATABASE_SUB_TYPE_CDBZDATABASE_SUB_TYPE_PDBZDATABASE_SUB_TYPE_NON_CDBZDATABASE_SUB_TYPE_ACDZDATABASE_SUB_TYPE_ADBZSCHEDULE_TYPE_IMMEDIATEZSCHEDULE_TYPE_LATERZJOB_TYPE_SQLZLIFECYCLE_STATE_ACTIVEZLIFECYCLE_STATE_INACTIVEr:   staticmethodr<   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r#   rY   r]   r^   r8   r8   r8   r9   r      s     

























	
	
	
	





r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r8   r8   r8   r9   <module>   s   