/**
 * DNS API
 * API for the DNS service. Use this API to manage DNS zones, records, and other DNS resources.
For more information, see [Overview of the DNS Service](/iaas/Content/DNS/Concepts/dnszonemanagement.htm).

 * OpenAPI spec version: 20180115
 *
 *
 * 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 { DnsClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class DnsWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forResolver ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getResolver ( request ) , response => targetStates . includes ( response . resolver . lifecycleState ! ) , targetStates . includes ( models . Resolver . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forResolverEndpoint ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getResolverEndpoint ( request ) , response => targetStates . includes ( response . resolverEndpoint . lifecycleState ! ) , targetStates . includes ( models . ResolverEndpoint . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forSteeringPolicy ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getSteeringPolicy ( request ) , response => targetStates . includes ( response . steeringPolicy . lifecycleState ! ) , targetStates . includes ( models . SteeringPolicy . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forSteeringPolicyAttachment ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getSteeringPolicyAttachment ( request ) , response => targetStates . includes ( response . steeringPolicyAttachment . lifecycleState ! ) ) ; } param request param targetStates return public async forTsigKey ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getTsigKey ( request ) , response => targetStates . includes ( response . tsigKey . lifecycleState ! ) , targetStates . includes ( models . TsigKey . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forView ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getView ( request ) , response => targetStates . includes ( response . view . lifecycleState ! ) , targetStates . includes ( models . View . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forZone ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getZone ( request ) , response => targetStates . includes ( response . zone . lifecycleState ! ) , targetStates . includes ( models . Zone . LifecycleState . Deleted ) ) ; } }