/**
 * 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 serviceRequests from "./request" ; import * as serviceResponses from "./response" ; import * as models from "./model" ; import { DevopsClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class DevopsWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forBuildPipeline ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getBuildPipeline ( request ) , response => targetStates . includes ( response . buildPipeline . lifecycleState ! ) , targetStates . includes ( models . BuildPipeline . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forBuildPipelineStage ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getBuildPipelineStage ( request ) , response => targetStates . includes ( response . buildPipelineStage . lifecycleState ! ) , targetStates . includes ( models . BuildPipelineStage . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forBuildRun ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getBuildRun ( request ) , response => targetStates . includes ( response . buildRun . lifecycleState ! ) ) ; } param request param targetStates return public async forConnection ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getConnection ( request ) , response => targetStates . includes ( response . connection . lifecycleState ! ) ) ; } param request param targetStates return public async forDeployArtifact ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDeployArtifact ( request ) , response => targetStates . includes ( response . deployArtifact . lifecycleState ! ) , targetStates . includes ( models . DeployArtifact . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDeployEnvironment ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDeployEnvironment ( request ) , response => targetStates . includes ( response . deployEnvironment . lifecycleState ! ) , targetStates . includes ( models . DeployEnvironment . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDeployPipeline ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDeployPipeline ( request ) , response => targetStates . includes ( response . deployPipeline . lifecycleState ! ) , targetStates . includes ( models . DeployPipeline . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDeployStage ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDeployStage ( request ) , response => targetStates . includes ( response . deployStage . lifecycleState ! ) , targetStates . includes ( models . DeployStage . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDeployment ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getDeployment ( request ) , response => targetStates . includes ( response . deployment . lifecycleState ! ) ) ; } param request param targetStates return public async forProject ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getProject ( request ) , response => targetStates . includes ( response . project . lifecycleState ! ) , targetStates . includes ( models . Project . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forRepository ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getRepository ( request ) , response => targetStates . includes ( response . repository . lifecycleState ! ) , targetStates . includes ( models . Repository . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forTrigger ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getTrigger ( request ) , response => targetStates . includes ( response . trigger . lifecycleState ! ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }