/**
 * Application Migration API
 * Application Migration simplifies the migration of applications from Oracle Cloud Infrastructure Classic to Oracle Cloud Infrastructure.
You can use Application Migration API to migrate applications, such as Oracle Java Cloud Service, SOA Cloud Service, and Integration Classic
instances, to Oracle Cloud Infrastructure. For more information, see
[Overview of Application Migration](/iaas/application-migration/appmigrationoverview.htm).

 * OpenAPI spec version: 20191031
 *
 *
 * 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 { ApplicationMigrationClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class ApplicationMigrationWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forMigration ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getMigration ( request ) , response => targetStates . includes ( response . migration . lifecycleState ! ) , targetStates . includes ( models . MigrationLifecycleStates . Deleted ) ) ; } param request param targetStates return public async forSource ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getSource ( request ) , response => targetStates . includes ( response . source . lifecycleState ! ) , targetStates . includes ( models . SourceLifecycleStates . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }