/**
 * Data Catalog API
 * Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata.
For more information, see [Data Catalog](https://docs.oracle.com/iaas/data-catalog/home.htm).

 * OpenAPI spec version: 20190325
 *
 *
 * 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 { DataCatalogClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class DataCatalogWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forAttribute ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getAttribute ( request ) , response => targetStates . includes ( response . attribute . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forAttributeTag ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getAttributeTag ( request ) , response => targetStates . includes ( response . attributeTag . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forCatalog ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getCatalog ( request ) , response => targetStates . includes ( response . catalog . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forCatalogPrivateEndpoint ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getCatalogPrivateEndpoint ( request ) , response => targetStates . includes ( response . catalogPrivateEndpoint . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forConnection ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getConnection ( request ) , response => targetStates . includes ( response . connection . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forCustomProperty ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getCustomProperty ( request ) , response => targetStates . includes ( response . customProperty . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDataAsset ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDataAsset ( request ) , response => targetStates . includes ( response . dataAsset . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forDataAssetTag ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getDataAssetTag ( request ) , response => targetStates . includes ( response . dataAssetTag . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forEntity ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getEntity ( request ) , response => targetStates . includes ( response . entity . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forEntityTag ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getEntityTag ( request ) , response => targetStates . includes ( response . entityTag . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forFolder ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getFolder ( request ) , response => targetStates . includes ( response . folder . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forFolderTag ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getFolderTag ( request ) , response => targetStates . includes ( response . folderTag . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forGlossary ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getGlossary ( request ) , response => targetStates . includes ( response . glossary . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forJob ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getJob ( request ) , response => targetStates . includes ( response . job . lifecycleState ! ) ) ; } param request param targetStates return public async forJobDefinition ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getJobDefinition ( request ) , response => targetStates . includes ( response . jobDefinition . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forJobExecution ( request , ... targetStates ) { return genericWaiter ( this . config , ( ) => this . client . getJobExecution ( request ) , response => targetStates . includes ( response . jobExecution . lifecycleState ! ) ) ; } param request param targetStates return public async forMetastore ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getMetastore ( request ) , response => targetStates . includes ( response . metastore . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forNamespace ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getNamespace ( request ) , response => targetStates . includes ( response . namespace . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forPattern ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getPattern ( request ) , response => targetStates . includes ( response . pattern . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forTerm ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getTerm ( request ) , response => targetStates . includes ( response . term . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forTermRelationship ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getTermRelationship ( request ) , response => targetStates . includes ( response . termRelationship . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request param targetStates return public async forType ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getType ( request ) , response => targetStates . includes ( response . type . lifecycleState ! ) , targetStates . includes ( models . LifecycleState . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }