/**
 * Oracle Cloud Agent API
 * API for the Oracle Cloud Agent software running on compute instances. Oracle Cloud Agent
is a lightweight process that monitors and manages compute instances.

 * OpenAPI spec version: 20180530
 *
 *
 * 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 { ComputeInstanceAgentWaiter } from "./computeinstanceagent-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum ComputeInstanceAgentApiKeys { } /**
 * 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 ComputeInstanceAgentClient { protected static serviceEndpointTemplate = "https://iaas.{region}.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : ComputeInstanceAgentWaiter ; 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 + "/20180530" ; if ( this . logger ) this . logger . info ( `ComputeInstanceAgentClient 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 ( ComputeInstanceAgentClient . 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 ( ComputeInstanceAgentClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new ComputeInstanceAgentWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param CancelInstanceAgentCommandRequest return throws example Click  https to see how to use CancelInstanceAgentCommand API.
        public async cancelInstanceAgentCommand ( cancelInstanceAgentCommandRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ComputeInstanceAgentClient#cancelInstanceAgentCommand." ) ; const pathParams = { "{instanceAgentCommandId}" : cancelInstanceAgentCommandRequest . instanceAgentCommandId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : cancelInstanceAgentCommandRequest . opcRequestId , "if-match" : cancelInstanceAgentCommandRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , cancelInstanceAgentCommandRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceAgentCommands/{instanceAgentCommandId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CancelInstanceAgentCommandResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param CreateInstanceAgentCommandRequest return throws example Click  https to see how to use CreateInstanceAgentCommand API.
        public async createInstanceAgentCommand ( createInstanceAgentCommandRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ComputeInstanceAgentClient#createInstanceAgentCommand." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createInstanceAgentCommandRequest . opcRequestId , "opc-retry-token" : createInstanceAgentCommandRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createInstanceAgentCommandRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceAgentCommands" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createInstanceAgentCommandRequest . createInstanceAgentCommandDetails , "CreateInstanceAgentCommandDetails" , model . CreateInstanceAgentCommandDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateInstanceAgentCommandResponse > { } , body : await response . json ( ) , bodyKey : "instanceAgentCommand" , bodyModel : model . InstanceAgentCommand , type : "model.InstanceAgentCommand" , 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 GetInstanceAgentCommandRequest return throws example Click  https to see how to use GetInstanceAgentCommand API.
      public async getInstanceAgentCommand ( getInstanceAgentCommandRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ComputeInstanceAgentClient#getInstanceAgentCommand." ) ; const pathParams = { "{instanceAgentCommandId}" : getInstanceAgentCommandRequest . instanceAgentCommandId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getInstanceAgentCommandRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getInstanceAgentCommandRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceAgentCommands/{instanceAgentCommandId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetInstanceAgentCommandResponse > { } , body : await response . json ( ) , bodyKey : "instanceAgentCommand" , bodyModel : model . InstanceAgentCommand , type : "model.InstanceAgentCommand" , 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 GetInstanceAgentCommandExecutionRequest return throws example Click  https to see how to use GetInstanceAgentCommandExecution API.
      public async getInstanceAgentCommandExecution ( getInstanceAgentCommandExecutionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ComputeInstanceAgentClient#getInstanceAgentCommandExecution." ) ; const pathParams = { "{instanceAgentCommandId}" : getInstanceAgentCommandExecutionRequest . instanceAgentCommandId } ; const queryParams = { "instanceId" : getInstanceAgentCommandExecutionRequest . instanceId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getInstanceAgentCommandExecutionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getInstanceAgentCommandExecutionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceAgentCommands/{instanceAgentCommandId}/status" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetInstanceAgentCommandExecutionResponse > { } , body : await response . json ( ) , bodyKey : "instanceAgentCommandExecution" , bodyModel : model . InstanceAgentCommandExecution , type : "model.InstanceAgentCommandExecution" , 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 ListInstanceAgentCommandExecutionsRequest return throws example Click  https to see how to use ListInstanceAgentCommandExecutions API.
      public async listInstanceAgentCommandExecutions ( listInstanceAgentCommandExecutionsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ComputeInstanceAgentClient#listInstanceAgentCommandExecutions." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listInstanceAgentCommandExecutionsRequest . compartmentId , "instanceId" : listInstanceAgentCommandExecutionsRequest . instanceId , "page" : listInstanceAgentCommandExecutionsRequest . page , "limit" : listInstanceAgentCommandExecutionsRequest . limit , "sortBy" : listInstanceAgentCommandExecutionsRequest . sortBy , "sortOrder" : listInstanceAgentCommandExecutionsRequest . sortOrder , "lifecycleState" : listInstanceAgentCommandExecutionsRequest . lifecycleState } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listInstanceAgentCommandExecutionsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listInstanceAgentCommandExecutionsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceAgentCommandExecutions" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListInstanceAgentCommandExecutionsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . InstanceAgentCommandExecutionSummary , type : "Array<model.InstanceAgentCommandExecutionSummary>" , 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 listAllInstanceAgentCommandExecutions ( request ) { return paginateRecords ( request , req => this . listInstanceAgentCommandExecutions ( req ) ) ; } param request public listAllInstanceAgentCommandExecutionsResponses ( request ) { return paginateResponses ( request , req => this . listInstanceAgentCommandExecutions ( req ) ) ; } param request public listInstanceAgentCommandExecutionsRecordIterator ( request ) { return paginateRecords ( request , req => this . listInstanceAgentCommandExecutions ( req ) ) ; } param request public listInstanceAgentCommandExecutionsResponseIterator ( request ) { return paginateResponses ( request , req => this . listInstanceAgentCommandExecutions ( req ) ) ; } param ListInstanceAgentCommandsRequest return throws example Click  https to see how to use ListInstanceAgentCommands API.
      public async listInstanceAgentCommands ( listInstanceAgentCommandsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ComputeInstanceAgentClient#listInstanceAgentCommands." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listInstanceAgentCommandsRequest . compartmentId , "page" : listInstanceAgentCommandsRequest . page , "limit" : listInstanceAgentCommandsRequest . limit , "sortBy" : listInstanceAgentCommandsRequest . sortBy , "sortOrder" : listInstanceAgentCommandsRequest . sortOrder } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listInstanceAgentCommandsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listInstanceAgentCommandsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceAgentCommands" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListInstanceAgentCommandsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . InstanceAgentCommandSummary , type : "Array<model.InstanceAgentCommandSummary>" , 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 listAllInstanceAgentCommands ( request ) { return paginateRecords ( request , req => this . listInstanceAgentCommands ( req ) ) ; } param request public listAllInstanceAgentCommandsResponses ( request ) { return paginateResponses ( request , req => this . listInstanceAgentCommands ( req ) ) ; } param request public listInstanceAgentCommandsRecordIterator ( request ) { return paginateRecords ( request , req => this . listInstanceAgentCommands ( req ) ) ; } param request public listInstanceAgentCommandsResponseIterator ( request ) { return paginateResponses ( request , req => this . listInstanceAgentCommands ( req ) ) ; } } export enum PluginApiKeys { } /**
 * 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 PluginClient { protected static serviceEndpointTemplate = "https://iaas.{region}.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; 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 + "/20180530" ; if ( this . logger ) this . logger . info ( `PluginClient 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 ( PluginClient . 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 ( PluginClient . serviceEndpointTemplate , regionId ) ; } param GetInstanceAgentPluginRequest return throws example Click  https to see how to use GetInstanceAgentPlugin API.
      public async getInstanceAgentPlugin ( getInstanceAgentPluginRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation PluginClient#getInstanceAgentPlugin." ) ; const pathParams = { "{instanceagentId}" : getInstanceAgentPluginRequest . instanceagentId , "{pluginName}" : getInstanceAgentPluginRequest . pluginName } ; const queryParams = { "compartmentId" : getInstanceAgentPluginRequest . compartmentId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getInstanceAgentPluginRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getInstanceAgentPluginRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceagents/{instanceagentId}/plugins/{pluginName}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetInstanceAgentPluginResponse > { } , body : await response . json ( ) , bodyKey : "instanceAgentPlugin" , bodyModel : model . InstanceAgentPlugin , type : "model.InstanceAgentPlugin" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListInstanceAgentPluginsRequest return throws example Click  https to see how to use ListInstanceAgentPlugins API.
      public async listInstanceAgentPlugins ( listInstanceAgentPluginsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation PluginClient#listInstanceAgentPlugins." ) ; const pathParams = { "{instanceagentId}" : listInstanceAgentPluginsRequest . instanceagentId } ; const queryParams = { "compartmentId" : listInstanceAgentPluginsRequest . compartmentId , "status" : listInstanceAgentPluginsRequest . status , "page" : listInstanceAgentPluginsRequest . page , "limit" : listInstanceAgentPluginsRequest . limit , "sortBy" : listInstanceAgentPluginsRequest . sortBy , "sortOrder" : listInstanceAgentPluginsRequest . sortOrder , "name" : listInstanceAgentPluginsRequest . name } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listInstanceAgentPluginsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listInstanceAgentPluginsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceagents/{instanceagentId}/plugins" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListInstanceAgentPluginsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . InstanceAgentPluginSummary , type : "Array<model.InstanceAgentPluginSummary>" , 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 listAllInstanceAgentPlugins ( request ) { return paginateRecords ( request , req => this . listInstanceAgentPlugins ( req ) ) ; } param request public listAllInstanceAgentPluginsResponses ( request ) { return paginateResponses ( request , req => this . listInstanceAgentPlugins ( req ) ) ; } param request public listInstanceAgentPluginsRecordIterator ( request ) { return paginateRecords ( request , req => this . listInstanceAgentPlugins ( req ) ) ; } param request public listInstanceAgentPluginsResponseIterator ( request ) { return paginateResponses ( request , req => this . listInstanceAgentPlugins ( req ) ) ; } } export enum PluginconfigApiKeys { } /**
 * 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 PluginconfigClient { protected static serviceEndpointTemplate = "https://iaas.{region}.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; 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 + "/20180530" ; if ( this . logger ) this . logger . info ( `PluginconfigClient 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 ( PluginconfigClient . 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 ( PluginconfigClient . serviceEndpointTemplate , regionId ) ; } param ListInstanceagentAvailablePluginsRequest return throws example Click  https to see how to use ListInstanceagentAvailablePlugins API.
      public async listInstanceagentAvailablePlugins ( listInstanceagentAvailablePluginsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation PluginconfigClient#listInstanceagentAvailablePlugins." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listInstanceagentAvailablePluginsRequest . compartmentId , "page" : listInstanceagentAvailablePluginsRequest . page , "limit" : listInstanceagentAvailablePluginsRequest . limit , "osName" : listInstanceagentAvailablePluginsRequest . osName , "osVersion" : listInstanceagentAvailablePluginsRequest . osVersion , "sortBy" : listInstanceagentAvailablePluginsRequest . sortBy , "sortOrder" : listInstanceagentAvailablePluginsRequest . sortOrder , "name" : listInstanceagentAvailablePluginsRequest . name } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listInstanceagentAvailablePluginsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listInstanceagentAvailablePluginsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/instanceagent/availablePlugins" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListInstanceagentAvailablePluginsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . AvailablePluginSummary , type : "Array<model.AvailablePluginSummary>" , 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 listAllInstanceagentAvailablePlugins ( request ) { return paginateRecords ( request , req => this . listInstanceagentAvailablePlugins ( req ) ) ; } param request public listAllInstanceagentAvailablePluginsResponses ( request ) { return paginateResponses ( request , req => this . listInstanceagentAvailablePlugins ( req ) ) ; } param request public listInstanceagentAvailablePluginsRecordIterator ( request ) { return paginateRecords ( request , req => this . listInstanceagentAvailablePlugins ( req ) ) ; } param request public listInstanceagentAvailablePluginsResponseIterator ( request ) { return paginateResponses ( request , req => this . listInstanceagentAvailablePlugins ( req ) ) ; } }