/**
 * Resource Manager API
 * Use the Resource Manager API to automate deployment and operations for all Oracle Cloud Infrastructure resources.
Using the infrastructure-as-code (IaC) model, the service is based on Terraform, an open source industry standard that lets DevOps engineers develop and deploy their infrastructure anywhere.
For more information, see
[the Resource Manager documentation](/iaas/Content/ResourceManager/home.htm).

 * OpenAPI spec version: 20180917
 *
 *
 * NOTE: This class is auto generated by OracleSDKGenerator.
 * Do not edit the class manually.
 *
 * Copyright (c) 2020, 2022, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */ import * as model from "../model" ; import common = require ( "oci-common" ) ; /**
 * The properties that define a job. Jobs perform the actions that are defined in your configuration.
 * - **Plan job**. A plan job takes your Terraform configuration, parses it, and creates an execution plan.
 * - **Apply job**. The apply job takes your execution plan, applies it to the associated stack, then executes
 * the configuration's instructions.
 * - **Destroy job**. To clean up the infrastructure controlled by the stack, you run a destroy job.
 * A destroy job does not delete the stack or associated job resources,
 * but instead releases the resources managed by the stack.
 * - **Import_TF_State job**. An import Terraform state job takes a Terraform state file and sets it as the current
 * state of the stack. This is used to migrate local Terraform environments to Resource Manager.
 *
 */ export interface Job { /**
     * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the job.
     */ "id" ? : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the stack that is associated with the job.
     */ "stackId" ? : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment in which the job's associated stack resides.
     */ "compartmentId" ? : string ; /**
     * The job's display name.
     */ "displayName" ? : string ; /**
     * The type of job executing.
     */ "operation" ? : Job . Operation ; "jobOperationDetails" ? : model . ImportTfStateJobOperationDetails | model . PlanJobOperationDetails | model . ApplyJobOperationDetails | model . DestroyJobOperationDetails ; "applyJobPlanResolution" ? : model . ApplyJobPlanResolution ; /**
     * Deprecated. Use the property `executionPlanJobId` in `jobOperationDetails` instead.
     * The plan job [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) that was used (if this was an apply job and was not auto-approved).
     *
     */ "resolvedPlanJobId" ? : string ; /**
     * The date and time when the job was created.
     * Format is defined by RFC3339.
     * Example: `2020-01-25T21:10:29.600Z`
     *
     */ "timeCreated" ? : Date ; /**
     * 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`
     *
     */ "timeFinished" ? : Date ; /**
     * 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).
     *
     */ "lifecycleState" ? : Job . LifecycleState ; "failureDetails" ? : model . FailureDetails ; "cancellationDetails" ? : model . CancellationDetails ; /**
     * File path to the directory from which Terraform runs.
     * If not specified, the root directory is used.
     * This parameter is ignored for the `configSourceType` value of `COMPARTMENT_CONFIG_SOURCE`.
     *
     */ "workingDirectory" ? : string ; /**
     * 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\"}`
     *
     */ "variables" ? : { [ key ] : string ; } ; "configSource" ? : model . GitConfigSourceRecord | model . ZipUploadConfigSourceRecord | model . ObjectStorageConfigSourceRecord ; /**
     * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
     * Example: `{\"Department\": \"Finance\"}`
     *
     */ "freeformTags" ? : { [ key ] : string ; } ; /**
     * Defined tags for this resource. Each key is predefined and scoped to a namespace.
     * For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
     * Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
     *
     */ "definedTags" ? : { [ key ] : { [ key ] : any ; } ; } ; } export namespace Job { export enum Operation { Plan = "PLAN" , Apply = "APPLY" , Destroy = "DESTROY" , ImportTfState = "IMPORT_TF_STATE" , /**
         * This value is used if a service returns a value for this enum that is not recognized by this
         * version of the SDK.
         */ UnknownValue = "UNKNOWN_VALUE" } export enum LifecycleState { Accepted = "ACCEPTED" , InProgress = "IN_PROGRESS" , Failed = "FAILED" , Succeeded = "SUCCEEDED" , Canceling = "CANCELING" , Canceled = "CANCELED" , /**
         * This value is used if a service returns a value for this enum that is not recognized by this
         * version of the SDK.
         */ UnknownValue = "UNKNOWN_VALUE" } export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { "jobOperationDetails" : obj . jobOperationDetails ? model . JobOperationDetails . getJsonObj ( obj . jobOperationDetails ) : undefined , "applyJobPlanResolution" : obj . applyJobPlanResolution ? model . ApplyJobPlanResolution . getJsonObj ( obj . applyJobPlanResolution ) : undefined , "failureDetails" : obj . failureDetails ? model . FailureDetails . getJsonObj ( obj . failureDetails ) : undefined , "cancellationDetails" : obj . cancellationDetails ? model . CancellationDetails . getJsonObj ( obj . cancellationDetails ) : undefined , "configSource" : obj . configSource ? model . ConfigSourceRecord . getJsonObj ( obj . configSource ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "jobOperationDetails" : obj . jobOperationDetails ? model . JobOperationDetails . getDeserializedJsonObj ( obj . jobOperationDetails ) : undefined , "applyJobPlanResolution" : obj . applyJobPlanResolution ? model . ApplyJobPlanResolution . getDeserializedJsonObj ( obj . applyJobPlanResolution ) : undefined , "failureDetails" : obj . failureDetails ? model . FailureDetails . getDeserializedJsonObj ( obj . failureDetails ) : undefined , "cancellationDetails" : obj . cancellationDetails ? model . CancellationDetails . getDeserializedJsonObj ( obj . cancellationDetails ) : undefined , "configSource" : obj . configSource ? model . ConfigSourceRecord . getDeserializedJsonObj ( obj . configSource ) : undefined } } ; return jsonObj ; } }