/**
 * LogAnalytics API
 * The LogAnalytics API for the LogAnalytics service.

 * OpenAPI spec version: 20200601
 *
 *
 * 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 { LogAnalyticsClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class LogAnalyticsWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forLogAnalyticsEmBridge ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getLogAnalyticsEmBridge ( request ) , response => targetStates . includes ( response . logAnalyticsEmBridge . lifecycleState ! ) , targetStates . includes ( models . EmBridgeLifecycleStates . Deleted ) ) ; } param request param targetStates return public async forLogAnalyticsEntity ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getLogAnalyticsEntity ( request ) , response => targetStates . includes ( response . logAnalyticsEntity . lifecycleState ! ) , targetStates . includes ( models . EntityLifecycleStates . Deleted ) ) ; } param request param targetStates return public async forLogAnalyticsEntityType ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getLogAnalyticsEntityType ( request ) , response => targetStates . includes ( response . logAnalyticsEntityType . lifecycleState ! ) , targetStates . includes ( models . EntityLifecycleStates . Deleted ) ) ; } param request param targetStates return public async forLogAnalyticsObjectCollectionRule ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getLogAnalyticsObjectCollectionRule ( request ) , response => targetStates . includes ( response . logAnalyticsObjectCollectionRule . lifecycleState ! ) , targetStates . includes ( models . ObjectCollectionRuleLifecycleStates . Deleted ) ) ; } param request return public async forQueryWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getQueryWorkRequest ( request ) , response => ( response . queryWorkRequest . timeFinished ? true : false ) ) ; } param request param targetStates return public async forScheduledTask ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getScheduledTask ( request ) , response => targetStates . includes ( response . scheduledTask . lifecycleState ! ) , targetStates . includes ( models . ScheduledTask . LifecycleState . Deleted ) ) ; } param request return public async forStorageWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getStorageWorkRequest ( request ) , response => ( response . storageWorkRequest . timeFinished ? true : false ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }