/**
 * DevOps API
 * Use the DevOps API to create DevOps projects, configure code repositories,  add artifacts to deploy, build and test software applications, configure  target deployment environments, and deploy software applications.  For more information, see [DevOps](/Content/devops/using/home.htm).
 * OpenAPI spec version: 20210630
 *
 *
 * 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 details about the run progress of a stage in a build run.
 */ export interface BuildPipelineStageRunProgress { /**
     * Build Run display name, which can be renamed and is not necessarily unique. Avoid entering confidential information.
     */ "stageDisplayName" ? : string ; /**
     * The stage OCID.
     */ "buildPipelineStageId" ? : string ; /**
     * The time the stage started executing. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339).
     */ "timeStarted" ? : Date ; /**
     * The time the stage finished executing. Format defined by [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339).
     */ "timeFinished" ? : Date ; /**
     * The current status of the stage.
     */ "status" ? : BuildPipelineStageRunProgress . Status ; "buildPipelineStagePredecessors" ? : model . BuildPipelineStagePredecessorCollection ; "buildPipelineStageType" : string ; } export namespace BuildPipelineStageRunProgress { export enum Status { 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 , ... { "buildPipelineStagePredecessors" : obj . buildPipelineStagePredecessors ? model . BuildPipelineStagePredecessorCollection . getJsonObj ( obj . buildPipelineStagePredecessors ) : undefined } } ; if ( "buildPipelineStageType" in obj && obj . buildPipelineStageType ) { switch ( obj . buildPipelineStageType ) { case "DELIVER_ARTIFACT" : return model . DeliverArtifactStageRunProgress . getJsonObj ( < model . DeliverArtifactStageRunProgress > ( < object > jsonObj ) , true ) ; case "WAIT" : return model . WaitStageRunProgress . getJsonObj ( < model . WaitStageRunProgress > ( < object > jsonObj ) , true ) ; case "TRIGGER_DEPLOYMENT_PIPELINE" : return model . TriggerDeploymentPipelineStageRunProgress . getJsonObj ( < model . TriggerDeploymentPipelineStageRunProgress > ( < object > jsonObj ) , true ) ; case "BUILD" : return model . BuildStageRunProgress . getJsonObj ( < model . BuildStageRunProgress > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . buildPipelineStageType ) ; } } return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "buildPipelineStagePredecessors" : obj . buildPipelineStagePredecessors ? model . BuildPipelineStagePredecessorCollection . getDeserializedJsonObj ( obj . buildPipelineStagePredecessors ) : undefined } } ; if ( "buildPipelineStageType" in obj && obj . buildPipelineStageType ) { switch ( obj . buildPipelineStageType ) { case "DELIVER_ARTIFACT" : return model . DeliverArtifactStageRunProgress . getDeserializedJsonObj ( < model . DeliverArtifactStageRunProgress > ( < object > jsonObj ) , true ) ; case "WAIT" : return model . WaitStageRunProgress . getDeserializedJsonObj ( < model . WaitStageRunProgress > ( < object > jsonObj ) , true ) ; case "TRIGGER_DEPLOYMENT_PIPELINE" : return model . TriggerDeploymentPipelineStageRunProgress . getDeserializedJsonObj ( < model . TriggerDeploymentPipelineStageRunProgress > ( < object > jsonObj ) , true ) ; case "BUILD" : return model . BuildStageRunProgress . getDeserializedJsonObj ( < model . BuildStageRunProgress > ( < object > jsonObj ) , true ) ; default : throw Error ( "Unknown value for: " + obj . buildPipelineStageType ) ; } } return jsonObj ; } }