/**
 * Data Science API
 * Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see [Data Science](https://docs.oracle.com/iaas/data-science/using/data-science.htm).

 * OpenAPI spec version: 20190101
 *
 *
 * 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 { DataScienceClient } from "./client" ; import { genericWaiter , genericTerminalConditionWaiter , WaiterConfiguration } from "oci-common" ; export class DataScienceWaiter { public constructor ( private client , private readonly config ? ) { } param request param targetStates return public async forJob ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getJob ( request ) , response => targetStates . includes ( response . job . lifecycleState ! ) , targetStates . includes ( models . JobLifecycleState . Deleted ) ) ; } param request param targetStates return public async forJobRun ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getJobRun ( request ) , response => targetStates . includes ( response . jobRun . lifecycleState ! ) , targetStates . includes ( models . JobRunLifecycleState . Deleted ) ) ; } param request param targetStates return public async forModel ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getModel ( request ) , response => targetStates . includes ( response . model . lifecycleState ! ) , targetStates . includes ( models . ModelLifecycleState . Deleted ) ) ; } param request param targetStates return public async forModelDeployment ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getModelDeployment ( request ) , response => targetStates . includes ( response . modelDeployment . lifecycleState ! ) , targetStates . includes ( models . ModelDeploymentLifecycleState . Deleted ) ) ; } param request param targetStates return public async forNotebookSession ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getNotebookSession ( request ) , response => targetStates . includes ( response . notebookSession . lifecycleState ! ) , targetStates . includes ( models . NotebookSessionLifecycleState . Deleted ) ) ; } param request param targetStates return public async forProject ( request , ... targetStates ) { return genericTerminalConditionWaiter ( this . config , ( ) => this . client . getProject ( request ) , response => targetStates . includes ( response . project . lifecycleState ! ) , targetStates . includes ( models . ProjectLifecycleState . Deleted ) ) ; } param request return public async forWorkRequest ( request ) { return genericWaiter ( this . config , ( ) => this . client . getWorkRequest ( request ) , response => ( response . workRequest . timeFinished ? true : false ) ) ; } }