o
    ɶds                     @   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                   @   sh  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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&dLdM Z'dNdO Z(dPdQ Z)dRS )SJoba  
    The properties of a job.
    A job performs the actions that are defined in your Terraform configuration.
    For instructions on managing jobs, see
    `Managing Jobs`__.
    For more information about jobs, see
    `Key Concepts`__.

    __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Tasks/jobs.htm
    __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts__jobdefinition
    PLANAPPLYDESTROYIMPORT_TF_STATEPLAN_ROLLBACKAPPLY_ROLLBACKACCEPTEDIN_PROGRESSFAILED	SUCCEEDED	CANCELINGCANCELEDc                 K   sl  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| _ 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.| _d.| _d.| _d.| _d.| _d.| _d.| _d.S )/aT  
        Initializes a new Job 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 Job.
        :type id: str

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

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

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

        :param operation:
            The value to assign to the operation property of this Job.
            Allowed values for this property are: "PLAN", "APPLY", "DESTROY", "IMPORT_TF_STATE", "PLAN_ROLLBACK", "APPLY_ROLLBACK", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type operation: str

        :param is_third_party_provider_experience_enabled:
            The value to assign to the is_third_party_provider_experience_enabled property of this Job.
        :type is_third_party_provider_experience_enabled: bool

        :param is_provider_upgrade_required:
            The value to assign to the is_provider_upgrade_required property of this Job.
        :type is_provider_upgrade_required: bool

        :param job_operation_details:
            The value to assign to the job_operation_details property of this Job.
        :type job_operation_details: oci.resource_manager.models.JobOperationDetails

        :param apply_job_plan_resolution:
            The value to assign to the apply_job_plan_resolution property of this Job.
        :type apply_job_plan_resolution: oci.resource_manager.models.ApplyJobPlanResolution

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

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

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

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

        :param failure_details:
            The value to assign to the failure_details property of this Job.
        :type failure_details: oci.resource_manager.models.FailureDetails

        :param cancellation_details:
            The value to assign to the cancellation_details property of this Job.
        :type cancellation_details: oci.resource_manager.models.CancellationDetails

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

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

        :param config_source:
            The value to assign to the config_source property of this Job.
        :type config_source: oci.resource_manager.models.ConfigSourceRecord

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

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

        idstrstack_idcompartment_iddisplay_name	operation*is_third_party_provider_experience_enabledboolis_provider_upgrade_requiredjob_operation_detailsZJobOperationDetailsapply_job_plan_resolutionZApplyJobPlanResolutionresolved_plan_job_idtime_createddatetimetime_finishedlifecycle_statefailure_detailsZFailureDetailscancellation_detailsZCancellationDetailsworking_directory	variableszdict(str, str)ZConfigSourceRecordzdict(str, dict(str, object)))config_sourcefreeform_tagsdefined_tagsZstackIdZcompartmentIdZdisplayNameZ%isThirdPartyProviderExperienceEnabledZisProviderUpgradeRequiredZjobOperationDetailsZapplyJobPlanResolutionZresolvedPlanJobIdZtimeCreatedZtimeFinishedZlifecycleStateZfailureDetailsZcancellationDetailsZworkingDirectoryZconfigSourceZfreeformTagsZdefinedTagsN)Zswagger_typesZattribute_map_id	_stack_id_compartment_id_display_name
_operation+_is_third_party_provider_experience_enabled_is_provider_upgrade_required_job_operation_details_apply_job_plan_resolution_resolved_plan_job_id_time_created_time_finished_lifecycle_state_failure_details_cancellation_details_working_directory
_variables_config_source_freeform_tags_defined_tags)selfkwargs r@   Cusr/lib/python3.10/site-packages/oci/resource_manager/models/job.py__init__J   s   Z	

	


zJob.__init__c                 C      | j S )z
        Gets the id of this Job.
        The `OCID`__ of the job.

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


        :return: The id of this Job.
        :rtype: str
        r*   r>   r@   r@   rA   r         zJob.idc                 C   
   || _ dS )z
        Sets the id of this Job.
        The `OCID`__ of the job.

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


        :param id: The id of this Job.
        :type: str
        NrD   )r>   r   r@   r@   rA   r         
c                 C   rC   )a  
        Gets the stack_id of this Job.
        The `OCID`__ of the stack that is associated with the job.

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


        :return: The stack_id of this Job.
        :rtype: str
        r+   rE   r@   r@   rA   r     rF   zJob.stack_idc                 C   rG   )a  
        Sets the stack_id of this Job.
        The `OCID`__ of the stack that is associated with the job.

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


        :param stack_id: The stack_id of this Job.
        :type: str
        NrI   )r>   r   r@   r@   rA   r     rH   c                 C   rC   )a*  
        Gets the compartment_id of this Job.
        The `OCID`__ of the compartment in which the job's associated stack resides.

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


        :return: The compartment_id of this Job.
        :rtype: str
        r,   rE   r@   r@   rA   r     rF   zJob.compartment_idc                 C   rG   )a7  
        Sets the compartment_id of this Job.
        The `OCID`__ of the compartment in which the job's associated stack resides.

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


        :param compartment_id: The compartment_id of this Job.
        :type: str
        NrJ   )r>   r   r@   r@   rA   r   -  rH   c                 C   rC   )z
        Gets the display_name of this Job.
        The job's display name.


        :return: The display_name of this Job.
        :rtype: str
        r-   rE   r@   r@   rA   r   ;  s   
zJob.display_namec                 C   rG   )z
        Sets the display_name of this Job.
        The job's display name.


        :param display_name: The display_name of this Job.
        :type: str
        NrK   )r>   r   r@   r@   rA   r   G  s   

c                 C   rC   )a  
        Gets the operation of this Job.
        The type of job executing.

        Allowed values for this property are: "PLAN", "APPLY", "DESTROY", "IMPORT_TF_STATE", "PLAN_ROLLBACK", "APPLY_ROLLBACK", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The operation of this Job.
        :rtype: str
        )r.   rE   r@   r@   rA   r   S     zJob.operationc                 C       g d}t ||sd}|| _dS )z
        Sets the operation of this Job.
        The type of job executing.


        :param operation: The operation of this Job.
        :type: str
        )r   r   r	   r
   r   r   UNKNOWN_ENUM_VALUEN)r   r.   )r>   r   allowed_valuesr@   r@   rA   r   b  s   


c                 C   rC   )a  
        Gets the is_third_party_provider_experience_enabled of this Job.
        When `true`, the stack sources third-party Terraform providers from
        `Terraform Registry`__ and allows
        :func:`custom_terraform_provider`.
        For more information about stack sourcing of third-party Terraform providers, see
        `Third-party Provider Configuration`__.

        __ https://registry.terraform.io/browse/providers
        __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/terraformconfigresourcemanager.htm#third-party-providers


        :return: The is_third_party_provider_experience_enabled of this Job.
        :rtype: bool
        r/   rE   r@   r@   rA   r   q     z.Job.is_third_party_provider_experience_enabledc                 C   rG   )a  
        Sets the is_third_party_provider_experience_enabled of this Job.
        When `true`, the stack sources third-party Terraform providers from
        `Terraform Registry`__ and allows
        :func:`custom_terraform_provider`.
        For more information about stack sourcing of third-party Terraform providers, see
        `Third-party Provider Configuration`__.

        __ https://registry.terraform.io/browse/providers
        __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/terraformconfigresourcemanager.htm#third-party-providers


        :param is_third_party_provider_experience_enabled: The is_third_party_provider_experience_enabled of this Job.
        :type: bool
        NrP   )r>   r   r@   r@   rA   r        
c                 C   rC   )a  
        Gets the is_provider_upgrade_required of this Job.
        Specifies whether or not to upgrade provider versions.
        Within the version constraints of your Terraform configuration, use the latest versions available from the source of Terraform providers.
        For more information about this option, see `Dependency Lock File (terraform.io)`__.

        __ https://www.terraform.io/language/files/dependency-lock


        :return: The is_provider_upgrade_required of this Job.
        :rtype: bool
        r0   rE   r@   r@   rA   r        z Job.is_provider_upgrade_requiredc                 C   rG   )a'  
        Sets the is_provider_upgrade_required of this Job.
        Specifies whether or not to upgrade provider versions.
        Within the version constraints of your Terraform configuration, use the latest versions available from the source of Terraform providers.
        For more information about this option, see `Dependency Lock File (terraform.io)`__.

        __ https://www.terraform.io/language/files/dependency-lock


        :param is_provider_upgrade_required: The is_provider_upgrade_required of this Job.
        :type: bool
        NrS   )r>   r   r@   r@   rA   r        
c                 C   rC   )z
        Gets the job_operation_details of this Job.

        :return: The job_operation_details of this Job.
        :rtype: oci.resource_manager.models.JobOperationDetails
        r1   rE   r@   r@   rA   r        zJob.job_operation_detailsc                 C   rG   )z
        Sets the job_operation_details of this Job.

        :param job_operation_details: The job_operation_details of this Job.
        :type: oci.resource_manager.models.JobOperationDetails
        NrV   )r>   r   r@   r@   rA   r        
c                 C   rC   )z
        Gets the apply_job_plan_resolution of this Job.

        :return: The apply_job_plan_resolution of this Job.
        :rtype: oci.resource_manager.models.ApplyJobPlanResolution
        r2   rE   r@   r@   rA   r     rW   zJob.apply_job_plan_resolutionc                 C   rG   )z
        Sets the apply_job_plan_resolution of this Job.

        :param apply_job_plan_resolution: The apply_job_plan_resolution of this Job.
        :type: oci.resource_manager.models.ApplyJobPlanResolution
        NrY   )r>   r   r@   r@   rA   r     rX   c                 C   rC   )a  
        Gets the resolved_plan_job_id of this Job.
        Deprecated. Use the property `executionPlanJobId` in `jobOperationDetails` instead.
        The plan job `OCID`__ that was used (if this was an apply job and was not auto-approved).

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


        :return: The resolved_plan_job_id of this Job.
        :rtype: str
        r3   rE   r@   r@   rA   r     rL   zJob.resolved_plan_job_idc                 C   rG   )a  
        Sets the resolved_plan_job_id of this Job.
        Deprecated. Use the property `executionPlanJobId` in `jobOperationDetails` instead.
        The plan job `OCID`__ that was used (if this was an apply job and was not auto-approved).

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


        :param resolved_plan_job_id: The resolved_plan_job_id of this Job.
        :type: str
        NrZ   )r>   r   r@   r@   rA   r        
c                 C   rC   )a  
        Gets the time_created of this Job.
        The date and time when the job was created.
        Format is defined by RFC3339.
        Example: `2020-01-25T21:10:29.600Z`


        :return: The time_created of this Job.
        :rtype: datetime
        r4   rE   r@   r@   rA   r     rF   zJob.time_createdc                 C   rG   )a  
        Sets the time_created of this Job.
        The date and time when the job was created.
        Format is defined by RFC3339.
        Example: `2020-01-25T21:10:29.600Z`


        :param time_created: The time_created of this Job.
        :type: datetime
        Nr\   )r>   r   r@   r@   rA   r     rH   c                 C   rC   )a<  
        Gets the time_finished of this Job.
        The date and time when the job stopped running, irrespective of whether the job ran successfully.
        Format is defined by RFC3339.
        Example: `2020-01-25T21:10:29.600Z`


        :return: The time_finished of this Job.
        :rtype: datetime
        r5   rE   r@   r@   rA   r!     rF   zJob.time_finishedc                 C   rG   )aH  
        Sets the time_finished of this Job.
        The date and time when the job stopped running, irrespective of whether the job ran successfully.
        Format is defined by RFC3339.
        Example: `2020-01-25T21:10:29.600Z`


        :param time_finished: The time_finished of this Job.
        :type: datetime
        Nr]   )r>   r!   r@   r@   rA   r!   '  rH   c                 C   rC   )a|  
        Gets the lifecycle_state of this Job.
        Current state of the specified job.
        For more information about job lifecycle states in Resource Manager, see
        `Key Concepts`__.

        __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts__JobStates

        Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", '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
        )r6   rE   r@   r@   rA   r"   5  rQ   zJob.lifecycle_statec                 C   rM   )a  
        Sets the lifecycle_state of this Job.
        Current state of the specified job.
        For more information about job lifecycle states in Resource Manager, see
        `Key Concepts`__.

        __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm#concepts__JobStates


        :param lifecycle_state: The lifecycle_state of this Job.
        :type: str
        )r   r   r   r   r   r   rN   N)r   r6   )r>   r"   rO   r@   r@   rA   r"   H  s   

c                 C   rC   )z
        Gets the failure_details of this Job.

        :return: The failure_details of this Job.
        :rtype: oci.resource_manager.models.FailureDetails
        r7   rE   r@   r@   rA   r#   [  rW   zJob.failure_detailsc                 C   rG   )z
        Sets the failure_details of this Job.

        :param failure_details: The failure_details of this Job.
        :type: oci.resource_manager.models.FailureDetails
        Nr^   )r>   r#   r@   r@   rA   r#   e  rX   c                 C   rC   )z
        Gets the cancellation_details of this Job.

        :return: The cancellation_details of this Job.
        :rtype: oci.resource_manager.models.CancellationDetails
        r8   rE   r@   r@   rA   r$   o  rW   zJob.cancellation_detailsc                 C   rG   )z
        Sets the cancellation_details of this Job.

        :param cancellation_details: The cancellation_details of this Job.
        :type: oci.resource_manager.models.CancellationDetails
        Nr_   )r>   r$   r@   r@   rA   r$   y  rX   c                 C   rC   )a  
        Gets the working_directory of this Job.
        File path to the directory to use for running Terraform.
        If not specified, the root directory is used.
        Required when using a zip Terraform configuration (`configSourceType` value of `ZIP_UPLOAD`) that contains folders.
        Ignored for the `configSourceType` value of `COMPARTMENT_CONFIG_SOURCE`.
        For more information about required and recommended file structure, see
        `File Structure (Terraform Configurations for Resource Manager)`__.

        __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/terraformconfigresourcemanager.htm#filestructure


        :return: The working_directory of this Job.
        :rtype: str
        r9   rE   r@   r@   rA   r%     rQ   zJob.working_directoryc                 C   rG   )a  
        Sets the working_directory of this Job.
        File path to the directory to use for running Terraform.
        If not specified, the root directory is used.
        Required when using a zip Terraform configuration (`configSourceType` value of `ZIP_UPLOAD`) that contains folders.
        Ignored for the `configSourceType` value of `COMPARTMENT_CONFIG_SOURCE`.
        For more information about required and recommended file structure, see
        `File Structure (Terraform Configurations for Resource Manager)`__.

        __ https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/terraformconfigresourcemanager.htm#filestructure


        :param working_directory: The working_directory of this Job.
        :type: str
        Nr`   )r>   r%   r@   r@   rA   r%     rR   c                 C   rC   )a  
        Gets the variables of this Job.
        Terraform variables associated with this resource.
        Maximum number of variables supported is 250.
        The maximum size of each variable, including both name and value, is 8192 bytes.
        Example: `{"CompartmentId": "compartment-id-value"}`


        :return: The variables of this Job.
        :rtype: dict(str, str)
        r:   rE   r@   r@   rA   r&     rL   zJob.variablesc                 C   rG   )a  
        Sets the variables of this Job.
        Terraform variables associated with this resource.
        Maximum number of variables supported is 250.
        The maximum size of each variable, including both name and value, is 8192 bytes.
        Example: `{"CompartmentId": "compartment-id-value"}`


        :param variables: The variables of this Job.
        :type: dict(str, str)
        Nra   )r>   r&   r@   r@   rA   r&     r[   c                 C   rC   )z
        Gets the config_source of this Job.

        :return: The config_source of this Job.
        :rtype: oci.resource_manager.models.ConfigSourceRecord
        r;   rE   r@   r@   rA   r'     rW   zJob.config_sourcec                 C   rG   )z
        Sets the config_source of this Job.

        :param config_source: The config_source of this Job.
        :type: oci.resource_manager.models.ConfigSourceRecord
        Nrb   )r>   r'   r@   r@   rA   r'     rX   c                 C   rC   )a  
        Gets the freeform_tags of this Job.
        Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

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


        :return: The freeform_tags of this Job.
        :rtype: dict(str, str)
        r<   rE   r@   r@   rA   r(     rT   zJob.freeform_tagsc                 C   rG   )a  
        Sets the freeform_tags of this Job.
        Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

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


        :param freeform_tags: The freeform_tags of this Job.
        :type: dict(str, str)
        Nrc   )r>   r(   r@   r@   rA   r(     rU   c                 C   rC   )a  
        Gets the defined_tags of this Job.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

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


        :return: The defined_tags of this Job.
        :rtype: dict(str, dict(str, object))
        r=   rE   r@   r@   rA   r)     rT   zJob.defined_tagsc                 C   rG   )a  
        Sets the defined_tags of this Job.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

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


        :param defined_tags: The defined_tags of this Job.
        :type: dict(str, dict(str, object))
        Nrd   )r>   r)   r@   r@   rA   r)     rU   c                 C   s   t | S N)r   rE   r@   r@   rA   __repr__  s   zJob.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r>   otherr@   r@   rA   __eq__  s   z
Job.__eq__c                 C   s
   | |k S re   r@   rh   r@   r@   rA   __ne__$  s   
z
Job.__ne__N)*__name__
__module____qualname____doc__ZOPERATION_PLANZOPERATION_APPLYZOPERATION_DESTROYZOPERATION_IMPORT_TF_STATEZOPERATION_PLAN_ROLLBACKZOPERATION_APPLY_ROLLBACKZLIFECYCLE_STATE_ACCEPTEDZLIFECYCLE_STATE_IN_PROGRESSZLIFECYCLE_STATE_FAILEDZLIFECYCLE_STATE_SUCCEEDEDZLIFECYCLE_STATE_CANCELINGZLIFECYCLE_STATE_CANCELEDrB   propertyr   setterr   r   r   r   r   r   r   r   r   r   r!   r"   r#   r$   r%   r&   r'   r(   r)   rf   rj   rk   r@   r@   r@   rA   r      s     














	
	
	
	








	
	
	
	




	
	



r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r@   r@   r@   rA   <module>   s   