/**
 * Email Delivery API
 * API for the Email Delivery service. Use this API to send high-volume, application-generated
emails. For more information, see [Overview of the Email Delivery Service](/iaas/Content/Email/Concepts/overview.htm).


**Note:** Write actions (POST, UPDATE, DELETE) may take several minutes to propagate and be reflected by the API.
If a subsequent read request fails to reflect your changes, wait a few minutes and try again.

 * OpenAPI spec version: 20170907
 * Contact: email-dev_us_grp@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 { EmailClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class EmailWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forDkim ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDkim ( request ) , response => targetStates . includes ( response . dkim . lifecycleState ! ) , targetStates . includes ( models . Dkim . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forEmailDomain ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getEmailDomain ( request ) , response => targetStates . includes ( response . emailDomain . lifecycleState ! ) , targetStates . includes ( models . EmailDomain . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forSender ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getSender ( request ) , response => targetStates . includes ( response . sender . lifecycleState ! ) , targetStates . includes ( models . Sender . LifecycleState . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }