/**
 * Digital Assistant Service Instance API
 * API to create and maintain Oracle Digital Assistant service instances.
 * OpenAPI spec version: 20190506
 *
 *
 * 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 common = require ( "oci-common" ) ; import * as requests from "./request" ; import * as model from "./model" ; import * as responses from "./response" ; import { paginateRecords , paginateResponses } from "oci-common" ; import { OdaWaiter } from "./oda-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum OdaApiKeys { } /**
 * This service client uses  common . CircuitBreaker . DefaultConfiguration for all the operations by default if no circuit breaker configuration is defined by the user.
  export class OdaClient { protected static serviceEndpointTemplate = "https://digitalassistant-api.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : OdaWaiter ; protected "_clientConfiguration" : common . ClientConfiguration ; protected _circuitBreaker = null ; protected _httpClient : common . HttpClient ; constructor ( params , clientConfiguration ? ) { const requestSigner = params . authenticationDetailsProvider ? new common . DefaultRequestSigner ( params . authenticationDetailsProvider ) : null ; if ( clientConfiguration ) { this . _clientConfiguration = clientConfiguration ; this . _circuitBreaker = clientConfiguration . circuitBreaker ? clientConfiguration . circuitBreaker ! . circuit : null ; } const specCircuitBreakerEnabled = true ; if ( ! this . _circuitBreaker && common . utils . isCircuitBreakerSystemEnabled ( clientConfiguration ! ) && ( specCircuitBreakerEnabled || common . CircuitBreaker . DefaultCircuitBreakerOverriden ) ) { this . _circuitBreaker = new common . CircuitBreaker ( ) . circuit ; } this . _httpClient = params . httpClient || new common . FetchHttpClient ( requestSigner , this . _circuitBreaker ) ; if ( params . authenticationDetailsProvider && common . isRegionProvider ( params . authenticationDetailsProvider ) ) { const provider = params . authenticationDetailsProvider ; if ( provider . getRegion ( ) ) { this . region = provider . getRegion ( ) ; } } } /**
     * Get the endpoint that is being used to call (ex, https://www.example.com).
     */ public get endpoint ( ) { return this . _endpoint ; } param endpoint public set endpoint ( endpoint ) { this . _endpoint = endpoint ; this . _endpoint = this . _endpoint + "/20190506" ; if ( this . logger ) this . logger . info ( `OdaClient endpoint set to ${ this . _endpoint }` ) ; } public get logger ( ) { return common . LOG . logger ; } /**
     * Sets the region to call (ex, Region.US_PHOENIX_1).
     * Note, this will call  {@link #endpoint(String) endpoint} after resolving the endpoint.
     *  param region public set region ( region ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegion ( OdaClient . serviceEndpointTemplate , region ) ; } /**
     * Sets the regionId to call (ex, 'us-phoenix-1').
     *
     * Note, this will first try to map the region ID to a known Region and call  {@link #region(Region) region} .
     * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
     * and then call  {@link #endpoint(String) endpoint} .
     *  param regionId public set regionId ( regionId ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegionId ( OdaClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new OdaWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param ChangeOdaInstanceCompartmentRequest return throws example Click  https to see how to use ChangeOdaInstanceCompartment API.
      public async changeOdaInstanceCompartment ( changeOdaInstanceCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#changeOdaInstanceCompartment." ) ; const pathParams = { "{odaInstanceId}" : changeOdaInstanceCompartmentRequest . odaInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeOdaInstanceCompartmentRequest . ifMatch , "opc-request-id" : changeOdaInstanceCompartmentRequest . opcRequestId , "opc-retry-token" : changeOdaInstanceCompartmentRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeOdaInstanceCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances/{odaInstanceId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeOdaInstanceCompartmentRequest . changeOdaInstanceCompartmentDetails , "ChangeOdaInstanceCompartmentDetails" , model . ChangeOdaInstanceCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeOdaInstanceCompartmentResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-work-request-id" ) , key : "opcWorkRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param CreateOdaInstanceRequest return throws example Click  https to see how to use CreateOdaInstance API.
        public async createOdaInstance ( createOdaInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#createOdaInstance." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createOdaInstanceRequest . opcRequestId , "opc-retry-token" : createOdaInstanceRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createOdaInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createOdaInstanceRequest . createOdaInstanceDetails , "CreateOdaInstanceDetails" , model . CreateOdaInstanceDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateOdaInstanceResponse > { } , body : await response . json ( ) , bodyKey : "odaInstance" , bodyModel : model . OdaInstance , type : "model.OdaInstance" , responseHeaders : [ { value : response . headers . get ( "Location" ) , key : "location" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } , { value : response . headers . get ( "opc-work-request-id" ) , key : "opcWorkRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param DeleteOdaInstanceRequest return throws example Click  https to see how to use DeleteOdaInstance API.
      public async deleteOdaInstance ( deleteOdaInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#deleteOdaInstance." ) ; const pathParams = { "{odaInstanceId}" : deleteOdaInstanceRequest . odaInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteOdaInstanceRequest . ifMatch , "opc-request-id" : deleteOdaInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteOdaInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances/{odaInstanceId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteOdaInstanceResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-work-request-id" ) , key : "opcWorkRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetOdaInstanceRequest return throws example Click  https to see how to use GetOdaInstance API.
      public async getOdaInstance ( getOdaInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#getOdaInstance." ) ; const pathParams = { "{odaInstanceId}" : getOdaInstanceRequest . odaInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getOdaInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getOdaInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances/{odaInstanceId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetOdaInstanceResponse > { } , body : await response . json ( ) , bodyKey : "odaInstance" , bodyModel : model . OdaInstance , type : "model.OdaInstance" , responseHeaders : [ { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetWorkRequestRequest return throws example Click  https to see how to use GetWorkRequest API.
        public async getWorkRequest ( getWorkRequestRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#getWorkRequest." ) ; const pathParams = { "{workRequestId}" : getWorkRequestRequest . workRequestId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getWorkRequestRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getWorkRequestRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/workRequests/{workRequestId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetWorkRequestResponse > { } , body : await response . json ( ) , bodyKey : "workRequest" , bodyModel : model . WorkRequest , type : "model.WorkRequest" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "retry-after" ) , key : "retryAfter" , dataType : "number" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListOdaInstancesRequest return throws example Click  https to see how to use ListOdaInstances API.
        public async listOdaInstances ( listOdaInstancesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#listOdaInstances." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listOdaInstancesRequest . compartmentId , "displayName" : listOdaInstancesRequest . displayName , "lifecycleState" : listOdaInstancesRequest . lifecycleState , "limit" : listOdaInstancesRequest . limit , "page" : listOdaInstancesRequest . page , "sortOrder" : listOdaInstancesRequest . sortOrder , "sortBy" : listOdaInstancesRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listOdaInstancesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listOdaInstancesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListOdaInstancesResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . OdaInstanceSummary , type : "Array<model.OdaInstanceSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllOdaInstances ( request ) { return paginateRecords ( request , req => this . listOdaInstances ( req ) ) ; } param request public listAllOdaInstancesResponses ( request ) { return paginateResponses ( request , req => this . listOdaInstances ( req ) ) ; } param request public listOdaInstancesRecordIterator ( request ) { return paginateRecords ( request , req => this . listOdaInstances ( req ) ) ; } param request public listOdaInstancesResponseIterator ( request ) { return paginateResponses ( request , req => this . listOdaInstances ( req ) ) ; } param ListWorkRequestErrorsRequest return throws example Click  https to see how to use ListWorkRequestErrors API.
        public async listWorkRequestErrors ( listWorkRequestErrorsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#listWorkRequestErrors." ) ; const pathParams = { "{workRequestId}" : listWorkRequestErrorsRequest . workRequestId } ; const queryParams = { "page" : listWorkRequestErrorsRequest . page , "limit" : listWorkRequestErrorsRequest . limit , "sortBy" : listWorkRequestErrorsRequest . sortBy , "sortOrder" : listWorkRequestErrorsRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listWorkRequestErrorsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listWorkRequestErrorsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/workRequests/{workRequestId}/errors" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListWorkRequestErrorsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . WorkRequestError , type : "Array<model.WorkRequestError>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllWorkRequestErrors ( request ) { return paginateRecords ( request , req => this . listWorkRequestErrors ( req ) ) ; } param request public listAllWorkRequestErrorsResponses ( request ) { return paginateResponses ( request , req => this . listWorkRequestErrors ( req ) ) ; } param request public listWorkRequestErrorsRecordIterator ( request ) { return paginateRecords ( request , req => this . listWorkRequestErrors ( req ) ) ; } param request public listWorkRequestErrorsResponseIterator ( request ) { return paginateResponses ( request , req => this . listWorkRequestErrors ( req ) ) ; } param ListWorkRequestLogsRequest return throws example Click  https to see how to use ListWorkRequestLogs API.
        public async listWorkRequestLogs ( listWorkRequestLogsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#listWorkRequestLogs." ) ; const pathParams = { "{workRequestId}" : listWorkRequestLogsRequest . workRequestId } ; const queryParams = { "page" : listWorkRequestLogsRequest . page , "limit" : listWorkRequestLogsRequest . limit , "sortBy" : listWorkRequestLogsRequest . sortBy , "sortOrder" : listWorkRequestLogsRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listWorkRequestLogsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listWorkRequestLogsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/workRequests/{workRequestId}/logs" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListWorkRequestLogsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . WorkRequestLogEntry , type : "Array<model.WorkRequestLogEntry>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllWorkRequestLogs ( request ) { return paginateRecords ( request , req => this . listWorkRequestLogs ( req ) ) ; } param request public listAllWorkRequestLogsResponses ( request ) { return paginateResponses ( request , req => this . listWorkRequestLogs ( req ) ) ; } param request public listWorkRequestLogsRecordIterator ( request ) { return paginateRecords ( request , req => this . listWorkRequestLogs ( req ) ) ; } param request public listWorkRequestLogsResponseIterator ( request ) { return paginateResponses ( request , req => this . listWorkRequestLogs ( req ) ) ; } param ListWorkRequestsRequest return throws example Click  https to see how to use ListWorkRequests API.
        public async listWorkRequests ( listWorkRequestsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#listWorkRequests." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listWorkRequestsRequest . compartmentId , "odaInstanceId" : listWorkRequestsRequest . odaInstanceId , "page" : listWorkRequestsRequest . page , "limit" : listWorkRequestsRequest . limit , "sortBy" : listWorkRequestsRequest . sortBy , "sortOrder" : listWorkRequestsRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listWorkRequestsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listWorkRequestsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/workRequests" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListWorkRequestsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . WorkRequestSummary , type : "Array<model.WorkRequestSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllWorkRequests ( request ) { return paginateRecords ( request , req => this . listWorkRequests ( req ) ) ; } param request public listAllWorkRequestsResponses ( request ) { return paginateResponses ( request , req => this . listWorkRequests ( req ) ) ; } param request public listWorkRequestsRecordIterator ( request ) { return paginateRecords ( request , req => this . listWorkRequests ( req ) ) ; } param request public listWorkRequestsResponseIterator ( request ) { return paginateResponses ( request , req => this . listWorkRequests ( req ) ) ; } param StartOdaInstanceRequest return throws example Click  https to see how to use StartOdaInstance API.
      public async startOdaInstance ( startOdaInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#startOdaInstance." ) ; const pathParams = { "{odaInstanceId}" : startOdaInstanceRequest . odaInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : startOdaInstanceRequest . opcRequestId , "if-match" : startOdaInstanceRequest . ifMatch , "opc-retry-token" : startOdaInstanceRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , startOdaInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances/{odaInstanceId}/actions/start" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . StartOdaInstanceResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-work-request-id" ) , key : "opcWorkRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param StopOdaInstanceRequest return throws example Click  https to see how to use StopOdaInstance API.
      public async stopOdaInstance ( stopOdaInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#stopOdaInstance." ) ; const pathParams = { "{odaInstanceId}" : stopOdaInstanceRequest . odaInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : stopOdaInstanceRequest . opcRequestId , "if-match" : stopOdaInstanceRequest . ifMatch , "opc-retry-token" : stopOdaInstanceRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , stopOdaInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances/{odaInstanceId}/actions/stop" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . StopOdaInstanceResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-work-request-id" ) , key : "opcWorkRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param UpdateOdaInstanceRequest return throws example Click  https to see how to use UpdateOdaInstance API.
      public async updateOdaInstance ( updateOdaInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OdaClient#updateOdaInstance." ) ; const pathParams = { "{odaInstanceId}" : updateOdaInstanceRequest . odaInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateOdaInstanceRequest . ifMatch , "opc-request-id" : updateOdaInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateOdaInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/odaInstances/{odaInstanceId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateOdaInstanceRequest . updateOdaInstanceDetails , "UpdateOdaInstanceDetails" , model . UpdateOdaInstanceDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateOdaInstanceResponse > { } , body : await response . json ( ) , bodyKey : "odaInstance" , bodyModel : model . OdaInstance , type : "model.OdaInstance" , responseHeaders : [ { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } }