/**
 * Load Balancing API
 * API for the Load Balancing service. Use this API to manage load balancers, backend sets, and related items. For more
information, see [Overview of Load Balancing](/iaas/Content/Balance/Concepts/balanceoverview.htm).

 * OpenAPI spec version: 20170115
 *
 *
 * 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" ) ; /**
 * Many of the API requests you use to create and configure load balancing do not take effect immediately.
 * In these cases, the request spawns an asynchronous work flow to fulfill the request. WorkRequest objects provide visibility
 * for in-progress work flows.
 * For more information about work requests, see [Viewing the State of a Work Request](https://docs.cloud.oracle.com/Content/Balance/Tasks/viewingworkrequest.htm).
 *
 */ export interface WorkRequest { /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request.
     */ "id" : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the load balancer with which the work request
     * is associated.
     *
     */ "loadBalancerId" : string ; /**
      * The type of action the work request represents.
  * <p>
  Example: `CreateListener`
  *
      */ "type" : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer.
     */ "compartmentId" ? : string ; /**
     * The current state of the work request.
     *
     */ "lifecycleState" : WorkRequest . LifecycleState ; /**
      * A collection of data, related to the load balancer provisioning process, that helps with debugging in the event of failure.
  * Possible data elements include:
  * <p>
  - workflow name
  * - event ID
  * - work request ID
  * - load balancer ID
  * - workflow completion message
  *
      */ "message" : string ; /**
      * The date and time the work request was created, in the format defined by RFC3339.
  * <p>
  Example: `2016-08-25T21:10:29.600Z`
  *
      */ "timeAccepted" : Date ; /**
      * The date and time the work request was completed, in the format defined by RFC3339.
  * <p>
  Example: `2016-08-25T21:10:29.600Z`
  *
      */ "timeFinished" ? : Date ; "errorDetails" : Array < model . WorkRequestError > ; } export namespace WorkRequest { export enum LifecycleState { 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 , ... { "errorDetails" : obj . errorDetails ? obj . errorDetails . map ( item => { return model . WorkRequestError . getJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "errorDetails" : obj . errorDetails ? obj . errorDetails . map ( item => { return model . WorkRequestError . getDeserializedJsonObj ( item ) ; } ) : undefined } } ; return jsonObj ; } }