/**
 * 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 serviceRequests from "./request" ; import * as serviceResponses from "./response" ; import * as models from "./model" ; import { ResourceManagerClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class ResourceManagerWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forConfigurationSourceProvider ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getConfigurationSourceProvider ( request ) , response => targetStates . includes ( response . configurationSourceProvider . lifecycleState ! ) ) ; } param request param targetStates return public async forJob ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getJob ( request ) , response => targetStates . includes ( response . job . lifecycleState ! ) ) ; } param request param targetStates return public async forStack ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getStack ( request ) , response => targetStates . includes ( response . stack . lifecycleState ! ) , targetStates . includes ( models . Stack . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forTemplate ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getTemplate ( request ) , response => targetStates . includes ( response . template . lifecycleState ! ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }