/**
 * Big Data Service API
 * REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications.

 * OpenAPI spec version: 20190531
 * Contact: rahul.ra.arora@oracle.com
 *
 * 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 { BdsClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class BdsWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forAutoScalingConfiguration ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getAutoScalingConfiguration ( request ) , response => targetStates . includes ( response . autoScalingConfiguration . lifecycleState ! ) , targetStates . includes ( models . AutoScalingConfiguration . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forBdsApiKey ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getBdsApiKey ( request ) , response => targetStates . includes ( response . bdsApiKey . lifecycleState ! ) , targetStates . includes ( models . BdsApiKey . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forBdsInstance ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getBdsInstance ( request ) , response => targetStates . includes ( response . bdsInstance . lifecycleState ! ) , targetStates . includes ( models . BdsInstance . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forBdsMetastoreConfiguration ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getBdsMetastoreConfiguration ( request ) , response => targetStates . includes ( response . bdsMetastoreConfiguration . lifecycleState ! ) , targetStates . includes ( models . BdsMetastoreConfiguration . LifecycleState . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }