/**
 * Web Application Acceleration and Security Services API
 * OCI Web Application Acceleration and Security Services
 * OpenAPI spec version: 20181116
 *
 *
 * 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 { WaasClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class WaasWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forAddressList ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getAddressList ( request ) , response => targetStates . includes ( response . addressList . lifecycleState ! ) , targetStates . includes ( models . LifecycleStates . Deleted ) ) ; } param request param targetStates return public async forCertificate ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getCertificate ( request ) , response => targetStates . includes ( response . certificate . lifecycleState ! ) , targetStates . includes ( models . LifecycleStates . Deleted ) ) ; } param request param targetStates return public async forCustomProtectionRule ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getCustomProtectionRule ( request ) , response => targetStates . includes ( response . customProtectionRule . lifecycleState ! ) , targetStates . includes ( models . LifecycleStates . Deleted ) ) ; } param request param targetStates return public async forWaasPolicy ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getWaasPolicy ( request ) , response => targetStates . includes ( response . waasPolicy . lifecycleState ! ) , targetStates . includes ( models . LifecycleStates . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }