/**
 * Data Safe API
 * APIs for using Oracle Data Safe.
 * OpenAPI spec version: 20181201
 *
 *
 * 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 { DataSafeClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class DataSafeWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forDataSafeConfiguration ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDataSafeConfiguration ( request ) , response => targetStates . includes ( response . dataSafeConfiguration . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDataSafePrivateEndpoint ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDataSafePrivateEndpoint ( request ) , response => targetStates . includes ( response . dataSafePrivateEndpoint . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forOnPremConnector ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getOnPremConnector ( request ) , response => targetStates . includes ( response . onPremConnector . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forSecurityAssessment ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getSecurityAssessment ( request ) , response => targetStates . includes ( response . securityAssessment . lifecycleState ! ) ) ; } param request param targetStates return public async forSecurityAssessmentComparison ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getSecurityAssessmentComparison ( request ) , response => targetStates . includes ( response . securityAssessmentComparison . lifecycleState ! ) ) ; } param request param targetStates return public async forTargetDatabase ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getTargetDatabase ( request ) , response => targetStates . includes ( response . targetDatabase . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forUserAssessment ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getUserAssessment ( request ) , response => targetStates . includes ( response . userAssessment . lifecycleState ! ) ) ; } param request param targetStates return public async forUserAssessmentComparison ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getUserAssessmentComparison ( request ) , response => targetStates . includes ( response . userAssessmentComparison . lifecycleState ! ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }