/**
 * Operations Insights API
 * Use the Operations Insights API to perform data extraction operations to obtain database
resource utilization, performance statistics, and reference information. For more information,
see [About Oracle Cloud Infrastructure Operations Insights](https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html).

 * OpenAPI spec version: 20200630
 *
 *
 * 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 { OperationsInsightsClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class OperationsInsightsWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forAwrHub ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getAwrHub ( request ) , response => targetStates . includes ( response . awrHub . lifecycleState ! ) , targetStates . includes ( models . AwrHubLifecycleState . Deleted ) ) ; } param request param targetStates return public async forDatabaseInsight ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDatabaseInsight ( request ) , response => targetStates . includes ( response . databaseInsight . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forEnterpriseManagerBridge ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getEnterpriseManagerBridge ( request ) , response => targetStates . includes ( response . enterpriseManagerBridge . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forExadataInsight ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getExadataInsight ( request ) , response => targetStates . includes ( response . exadataInsight . lifecycleState ! ) , targetStates . includes ( models . ExadataInsightLifecycleState . Deleted ) ) ; } param request param targetStates return public async forHostInsight ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getHostInsight ( request ) , response => targetStates . includes ( response . hostInsight . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forOperationsInsightsWarehouse ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getOperationsInsightsWarehouse ( request ) , response => targetStates . includes ( response . operationsInsightsWarehouse . lifecycleState ! ) , targetStates . includes ( models . OperationsInsightsWarehouseLifecycleState . Deleted ) ) ; } param request param targetStates return public async forOperationsInsightsWarehouseUser ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getOperationsInsightsWarehouseUser ( request ) , response => targetStates . includes ( response . operationsInsightsWarehouseUser . lifecycleState ! ) , targetStates . includes ( models . OperationsInsightsWarehouseUserLifecycleState . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }