/**
 * Oracle Integration API
 * Oracle Integration API.
 * OpenAPI spec version: 20190131
 *
 *
 * 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 { IntegrationInstanceWaiter } from "./integrationinstance-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum IntegrationInstanceApiKeys { } /**
 * 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 IntegrationInstanceClient { protected static serviceEndpointTemplate = "https://integration.{region}.ocp.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : IntegrationInstanceWaiter ; 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 + "/20190131" ; if ( this . logger ) this . logger . info ( `IntegrationInstanceClient 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 ( IntegrationInstanceClient . 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 ( IntegrationInstanceClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new IntegrationInstanceWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param ChangeIntegrationInstanceCompartmentRequest return throws example Click  https to see how to use ChangeIntegrationInstanceCompartment API.
      public async changeIntegrationInstanceCompartment ( changeIntegrationInstanceCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#changeIntegrationInstanceCompartment." ) ; const pathParams = { "{integrationInstanceId}" : changeIntegrationInstanceCompartmentRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeIntegrationInstanceCompartmentRequest . ifMatch , "opc-request-id" : changeIntegrationInstanceCompartmentRequest . opcRequestId , "opc-retry-token" : changeIntegrationInstanceCompartmentRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeIntegrationInstanceCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeIntegrationInstanceCompartmentRequest . changeIntegrationInstanceCompartmentDetails , "ChangeIntegrationInstanceCompartmentDetails" , model . ChangeIntegrationInstanceCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeIntegrationInstanceCompartmentResponse > { } , 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 ChangeIntegrationInstanceNetworkEndpointRequest return throws example Click  https to see how to use ChangeIntegrationInstanceNetworkEndpoint API.
      public async changeIntegrationInstanceNetworkEndpoint ( changeIntegrationInstanceNetworkEndpointRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#changeIntegrationInstanceNetworkEndpoint." ) ; const pathParams = { "{integrationInstanceId}" : changeIntegrationInstanceNetworkEndpointRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeIntegrationInstanceNetworkEndpointRequest . ifMatch , "opc-request-id" : changeIntegrationInstanceNetworkEndpointRequest . opcRequestId , "opc-retry-token" : changeIntegrationInstanceNetworkEndpointRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeIntegrationInstanceNetworkEndpointRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}/actions/changeNetworkEndpoint" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeIntegrationInstanceNetworkEndpointRequest . changeIntegrationInstanceNetworkEndpointDetails , "ChangeIntegrationInstanceNetworkEndpointDetails" , model . ChangeIntegrationInstanceNetworkEndpointDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeIntegrationInstanceNetworkEndpointResponse > { } , 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 CreateIntegrationInstanceRequest return throws example Click  https to see how to use CreateIntegrationInstance API.
      public async createIntegrationInstance ( createIntegrationInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#createIntegrationInstance." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createIntegrationInstanceRequest . opcRetryToken , "opc-request-id" : createIntegrationInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createIntegrationInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createIntegrationInstanceRequest . createIntegrationInstanceDetails , "CreateIntegrationInstanceDetails" , model . CreateIntegrationInstanceDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateIntegrationInstanceResponse > { } , 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 DeleteIntegrationInstanceRequest return throws example Click  https to see how to use DeleteIntegrationInstance API.
      public async deleteIntegrationInstance ( deleteIntegrationInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#deleteIntegrationInstance." ) ; const pathParams = { "{integrationInstanceId}" : deleteIntegrationInstanceRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteIntegrationInstanceRequest . ifMatch , "opc-request-id" : deleteIntegrationInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteIntegrationInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteIntegrationInstanceResponse > { } , 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 GetIntegrationInstanceRequest return throws example Click  https to see how to use GetIntegrationInstance API.
      public async getIntegrationInstance ( getIntegrationInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#getIntegrationInstance." ) ; const pathParams = { "{integrationInstanceId}" : getIntegrationInstanceRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getIntegrationInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getIntegrationInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetIntegrationInstanceResponse > { } , body : await response . json ( ) , bodyKey : "integrationInstance" , bodyModel : model . IntegrationInstance , type : "model.IntegrationInstance" , 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 IntegrationInstanceClient#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 ( "etag" ) , key : "etag" , dataType : "string" } , { 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 ListIntegrationInstancesRequest return throws example Click  https to see how to use ListIntegrationInstances API.
      public async listIntegrationInstances ( listIntegrationInstancesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#listIntegrationInstances." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listIntegrationInstancesRequest . compartmentId , "displayName" : listIntegrationInstancesRequest . displayName , "lifecycleState" : listIntegrationInstancesRequest . lifecycleState , "limit" : listIntegrationInstancesRequest . limit , "page" : listIntegrationInstancesRequest . page , "sortOrder" : listIntegrationInstancesRequest . sortOrder , "sortBy" : listIntegrationInstancesRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listIntegrationInstancesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listIntegrationInstancesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListIntegrationInstancesResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . IntegrationInstanceSummary , type : "Array<model.IntegrationInstanceSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-previous-page" ) , key : "opcPreviousPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllIntegrationInstances ( request ) { return paginateRecords ( request , req => this . listIntegrationInstances ( req ) ) ; } param request public listAllIntegrationInstancesResponses ( request ) { return paginateResponses ( request , req => this . listIntegrationInstances ( req ) ) ; } param request public listIntegrationInstancesRecordIterator ( request ) { return paginateRecords ( request , req => this . listIntegrationInstances ( req ) ) ; } param request public listIntegrationInstancesResponseIterator ( request ) { return paginateResponses ( request , req => this . listIntegrationInstances ( 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 IntegrationInstanceClient#listWorkRequestErrors." ) ; const pathParams = { "{workRequestId}" : listWorkRequestErrorsRequest . workRequestId } ; const queryParams = { "compartmentId" : listWorkRequestErrorsRequest . compartmentId , "limit" : listWorkRequestErrorsRequest . limit , "page" : listWorkRequestErrorsRequest . page } ; 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-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-previous-page" ) , key : "opcPreviousPage" , 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 IntegrationInstanceClient#listWorkRequestLogs." ) ; const pathParams = { "{workRequestId}" : listWorkRequestLogsRequest . workRequestId } ; const queryParams = { "compartmentId" : listWorkRequestLogsRequest . compartmentId , "limit" : listWorkRequestLogsRequest . limit , "page" : listWorkRequestLogsRequest . page } ; 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-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-previous-page" ) , key : "opcPreviousPage" , 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 IntegrationInstanceClient#listWorkRequests." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listWorkRequestsRequest . compartmentId , "page" : listWorkRequestsRequest . page , "limit" : listWorkRequestsRequest . limit , "integrationInstanceId" : listWorkRequestsRequest . integrationInstanceId } ; 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" } , { value : response . headers . get ( "opc-previous-page" ) , key : "opcPreviousPage" , 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 StartIntegrationInstanceRequest return throws example Click  https to see how to use StartIntegrationInstance API.
      public async startIntegrationInstance ( startIntegrationInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#startIntegrationInstance." ) ; const pathParams = { "{integrationInstanceId}" : startIntegrationInstanceRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : startIntegrationInstanceRequest . ifMatch , "opc-request-id" : startIntegrationInstanceRequest . opcRequestId , "opc-retry-token" : startIntegrationInstanceRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , startIntegrationInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}/actions/start" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . StartIntegrationInstanceResponse > { } , 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 StopIntegrationInstanceRequest return throws example Click  https to see how to use StopIntegrationInstance API.
      public async stopIntegrationInstance ( stopIntegrationInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#stopIntegrationInstance." ) ; const pathParams = { "{integrationInstanceId}" : stopIntegrationInstanceRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : stopIntegrationInstanceRequest . ifMatch , "opc-request-id" : stopIntegrationInstanceRequest . opcRequestId , "opc-retry-token" : stopIntegrationInstanceRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , stopIntegrationInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}/actions/stop" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . StopIntegrationInstanceResponse > { } , 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 UpdateIntegrationInstanceRequest return throws example Click  https to see how to use UpdateIntegrationInstance API.
      public async updateIntegrationInstance ( updateIntegrationInstanceRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation IntegrationInstanceClient#updateIntegrationInstance." ) ; const pathParams = { "{integrationInstanceId}" : updateIntegrationInstanceRequest . integrationInstanceId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateIntegrationInstanceRequest . ifMatch , "opc-request-id" : updateIntegrationInstanceRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateIntegrationInstanceRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/integrationInstances/{integrationInstanceId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateIntegrationInstanceRequest . updateIntegrationInstanceDetails , "UpdateIntegrationInstanceDetails" , model . UpdateIntegrationInstanceDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateIntegrationInstanceResponse > { } , 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 ; } } }