/**
 * 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 status of a work request.
 */ export interface WorkRequest { /**
     * The asynchronous operation tracked by this work request.
     */ "operationType" : WorkRequest . OperationType ; /**
     * The status of the work request.
     */ "status" : WorkRequest . Status ; /**
     * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) identifying this work request.
     */ "id" : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing this work request.
     */ "compartmentId" : string ; /**
     * The resources affected by this work request.
     */ "resources" : Array < model . WorkRequestResource > ; /**
     * The amount of work done relative to the total amount of work. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
     */ "percentComplete" : number ; /**
     * The date and time when the work request was created.
     * Format is defined by RFC3339.
     * Example: `2020-01-25T21:10:29.600Z`
     *
     */ "timeAccepted" : Date ; /**
     * The date and time when the work request transitioned from ACCEPTED to IN_PROGRESS.
     * Format is defined by RFC3339.
     * Example: `2020-01-25T21:10:29.600Z`
     *
     */ "timeStarted" ? : Date ; /**
     * The date and time when the work request reached a terminal state (FAILED or SUCCEEDED).
     * Format is defined by RFC3339.
     * Example: `2020-01-25T21:10:29.600Z`
     *
     */ "timeFinished" ? : Date ; } export namespace WorkRequest { export enum OperationType { ChangeStackCompartment = "CHANGE_STACK_COMPARTMENT" , CreateStackFromCompartment = "CREATE_STACK_FROM_COMPARTMENT" , DriftDetection = "DRIFT_DETECTION" , /**
         * 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 Status { Accepted = "ACCEPTED" , InProgress = "IN_PROGRESS" , Failed = "FAILED" , Succeeded = "SUCCEEDED" , /**
         * 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 , ... { "resources" : obj . resources ? obj . resources . map ( item => { return model . WorkRequestResource . getJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "resources" : obj . resources ? obj . resources . map ( item => { return model . WorkRequestResource . getDeserializedJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } }