/**
 * Cloud Advisor API
 * Use the Cloud Advisor API to find potential inefficiencies in your tenancy and address them.
Cloud Advisor can help you save money, improve performance, strengthen system resilience, and improve security.
For more information, see [Cloud Advisor](/Content/CloudAdvisor/Concepts/cloudadvisoroverview.htm).

 * OpenAPI spec version: 20200606
 *
 *
 * 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 { OptimizerWaiter } from "./optimizer-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum OptimizerApiKeys { } /**
 * 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 OptimizerClient { protected static serviceEndpointTemplate = "https://optimizer.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : OptimizerWaiter ; 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 + "/20200606" ; if ( this . logger ) this . logger . info ( `OptimizerClient 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 ( OptimizerClient . 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 ( OptimizerClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new OptimizerWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param BulkApplyRecommendationsRequest return throws example Click  https to see how to use BulkApplyRecommendations API.
      public async bulkApplyRecommendations ( bulkApplyRecommendationsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#bulkApplyRecommendations." ) ; const pathParams = { "{recommendationId}" : bulkApplyRecommendationsRequest . recommendationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : bulkApplyRecommendationsRequest . opcRequestId , "opc-retry-token" : bulkApplyRecommendationsRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , bulkApplyRecommendationsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/recommendations/{recommendationId}/actions/bulkApplyRecommendations" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( bulkApplyRecommendationsRequest . bulkApplyRecommendationsDetails , "BulkApplyRecommendationsDetails" , model . BulkApplyRecommendationsDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . BulkApplyRecommendationsResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-work-request-id" ) , key : "opcWorkRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param CreateProfileRequest return throws example Click  https to see how to use CreateProfile API.
      public async createProfile ( createProfileRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#createProfile." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createProfileRequest . opcRequestId , "opc-retry-token" : createProfileRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createProfileRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/profiles" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createProfileRequest . createProfileDetails , "CreateProfileDetails" , model . CreateProfileDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateProfileResponse > { } , body : await response . json ( ) , bodyKey : "profile" , bodyModel : model . Profile , type : "model.Profile" , 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 DeleteProfileRequest return throws example Click  https to see how to use DeleteProfile API.
      public async deleteProfile ( deleteProfileRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#deleteProfile." ) ; const pathParams = { "{profileId}" : deleteProfileRequest . profileId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteProfileRequest . ifMatch , "opc-request-id" : deleteProfileRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteProfileRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/profiles/{profileId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteProfileResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param FilterResourceActionsRequest return throws example Click  https to see how to use FilterResourceActions API.
      public async filterResourceActions ( filterResourceActionsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#filterResourceActions." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : filterResourceActionsRequest . compartmentId , "compartmentIdInSubtree" : filterResourceActionsRequest . compartmentIdInSubtree , "recommendationId" : filterResourceActionsRequest . recommendationId , "limit" : filterResourceActionsRequest . limit , "page" : filterResourceActionsRequest . page } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : filterResourceActionsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , filterResourceActionsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/actions/filterResourceActions" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( filterResourceActionsRequest . queryDetails , "QueryDetails" , model . QueryDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . FilterResourceActionsResponse > { } , body : await response . json ( ) , bodyKey : "resourceActionCollection" , bodyModel : model . ResourceActionCollection , type : "model.ResourceActionCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetCategoryRequest return throws example Click  https to see how to use GetCategory API.
      public async getCategory ( getCategoryRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#getCategory." ) ; const pathParams = { "{categoryId}" : getCategoryRequest . categoryId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getCategoryRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getCategoryRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/categories/{categoryId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetCategoryResponse > { } , body : await response . json ( ) , bodyKey : "category" , bodyModel : model . Category , type : "model.Category" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetEnrollmentStatusRequest return throws example Click  https to see how to use GetEnrollmentStatus API.
      public async getEnrollmentStatus ( getEnrollmentStatusRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#getEnrollmentStatus." ) ; const pathParams = { "{enrollmentStatusId}" : getEnrollmentStatusRequest . enrollmentStatusId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getEnrollmentStatusRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getEnrollmentStatusRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/enrollmentStatus/{enrollmentStatusId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetEnrollmentStatusResponse > { } , body : await response . json ( ) , bodyKey : "enrollmentStatus" , bodyModel : model . EnrollmentStatus , type : "model.EnrollmentStatus" , 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 GetProfileRequest return throws example Click  https to see how to use GetProfile API.
      public async getProfile ( getProfileRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#getProfile." ) ; const pathParams = { "{profileId}" : getProfileRequest . profileId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getProfileRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getProfileRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/profiles/{profileId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetProfileResponse > { } , body : await response . json ( ) , bodyKey : "profile" , bodyModel : model . Profile , type : "model.Profile" , 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 GetRecommendationRequest return throws example Click  https to see how to use GetRecommendation API.
      public async getRecommendation ( getRecommendationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#getRecommendation." ) ; const pathParams = { "{recommendationId}" : getRecommendationRequest . recommendationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getRecommendationRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getRecommendationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/recommendations/{recommendationId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetRecommendationResponse > { } , body : await response . json ( ) , bodyKey : "recommendation" , bodyModel : model . Recommendation , type : "model.Recommendation" , 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 GetResourceActionRequest return throws example Click  https to see how to use GetResourceAction API.
      public async getResourceAction ( getResourceActionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#getResourceAction." ) ; const pathParams = { "{resourceActionId}" : getResourceActionRequest . resourceActionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getResourceActionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getResourceActionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/resourceActions/{resourceActionId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetResourceActionResponse > { } , body : await response . json ( ) , bodyKey : "resourceAction" , bodyModel : model . ResourceAction , type : "model.ResourceAction" , 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 OptimizerClient#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 ListCategoriesRequest return throws example Click  https to see how to use ListCategories API.
      public async listCategories ( listCategoriesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listCategories." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listCategoriesRequest . compartmentId , "compartmentIdInSubtree" : listCategoriesRequest . compartmentIdInSubtree , "name" : listCategoriesRequest . name , "limit" : listCategoriesRequest . limit , "page" : listCategoriesRequest . page , "sortOrder" : listCategoriesRequest . sortOrder , "sortBy" : listCategoriesRequest . sortBy , "lifecycleState" : listCategoriesRequest . lifecycleState } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listCategoriesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listCategoriesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/categories" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListCategoriesResponse > { } , body : await response . json ( ) , bodyKey : "categoryCollection" , bodyModel : model . CategoryCollection , type : "model.CategoryCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListEnrollmentStatusesRequest return throws example Click  https to see how to use ListEnrollmentStatuses API.
      public async listEnrollmentStatuses ( listEnrollmentStatusesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listEnrollmentStatuses." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listEnrollmentStatusesRequest . compartmentId , "limit" : listEnrollmentStatusesRequest . limit , "page" : listEnrollmentStatusesRequest . page , "sortOrder" : listEnrollmentStatusesRequest . sortOrder , "sortBy" : listEnrollmentStatusesRequest . sortBy , "lifecycleState" : listEnrollmentStatusesRequest . lifecycleState , "status" : listEnrollmentStatusesRequest . status } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listEnrollmentStatusesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listEnrollmentStatusesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/enrollmentStatus" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListEnrollmentStatusesResponse > { } , body : await response . json ( ) , bodyKey : "enrollmentStatusCollection" , bodyModel : model . EnrollmentStatusCollection , type : "model.EnrollmentStatusCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListHistoriesRequest return throws example Click  https to see how to use ListHistories API.
      public async listHistories ( listHistoriesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listHistories." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listHistoriesRequest . compartmentId , "compartmentIdInSubtree" : listHistoriesRequest . compartmentIdInSubtree , "name" : listHistoriesRequest . name , "recommendationName" : listHistoriesRequest . recommendationName , "recommendationId" : listHistoriesRequest . recommendationId , "resourceType" : listHistoriesRequest . resourceType , "limit" : listHistoriesRequest . limit , "page" : listHistoriesRequest . page , "sortOrder" : listHistoriesRequest . sortOrder , "sortBy" : listHistoriesRequest . sortBy , "lifecycleState" : listHistoriesRequest . lifecycleState , "status" : listHistoriesRequest . status } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listHistoriesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listHistoriesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/histories" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListHistoriesResponse > { } , body : await response . json ( ) , bodyKey : "historyCollection" , bodyModel : model . HistoryCollection , type : "model.HistoryCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListProfileLevelsRequest return throws example Click  https to see how to use ListProfileLevels API.
      public async listProfileLevels ( listProfileLevelsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listProfileLevels." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listProfileLevelsRequest . compartmentId , "compartmentIdInSubtree" : listProfileLevelsRequest . compartmentIdInSubtree , "name" : listProfileLevelsRequest . name , "recommendationName" : listProfileLevelsRequest . recommendationName , "limit" : listProfileLevelsRequest . limit , "page" : listProfileLevelsRequest . page , "sortOrder" : listProfileLevelsRequest . sortOrder , "sortBy" : listProfileLevelsRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listProfileLevelsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listProfileLevelsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/profileLevels" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListProfileLevelsResponse > { } , body : await response . json ( ) , bodyKey : "profileLevelCollection" , bodyModel : model . ProfileLevelCollection , type : "model.ProfileLevelCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListProfilesRequest return throws example Click  https to see how to use ListProfiles API.
      public async listProfiles ( listProfilesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listProfiles." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listProfilesRequest . compartmentId , "name" : listProfilesRequest . name , "limit" : listProfilesRequest . limit , "page" : listProfilesRequest . page , "sortOrder" : listProfilesRequest . sortOrder , "sortBy" : listProfilesRequest . sortBy , "lifecycleState" : listProfilesRequest . lifecycleState } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listProfilesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listProfilesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/profiles" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListProfilesResponse > { } , body : await response . json ( ) , bodyKey : "profileCollection" , bodyModel : model . ProfileCollection , type : "model.ProfileCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListRecommendationStrategiesRequest return throws example Click  https to see how to use ListRecommendationStrategies API.
      public async listRecommendationStrategies ( listRecommendationStrategiesRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listRecommendationStrategies." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listRecommendationStrategiesRequest . compartmentId , "compartmentIdInSubtree" : listRecommendationStrategiesRequest . compartmentIdInSubtree , "name" : listRecommendationStrategiesRequest . name , "recommendationName" : listRecommendationStrategiesRequest . recommendationName , "limit" : listRecommendationStrategiesRequest . limit , "page" : listRecommendationStrategiesRequest . page , "sortOrder" : listRecommendationStrategiesRequest . sortOrder , "sortBy" : listRecommendationStrategiesRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listRecommendationStrategiesRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listRecommendationStrategiesRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/recommendationStrategies" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListRecommendationStrategiesResponse > { } , body : await response . json ( ) , bodyKey : "recommendationStrategyCollection" , bodyModel : model . RecommendationStrategyCollection , type : "model.RecommendationStrategyCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListRecommendationsRequest return throws example Click  https to see how to use ListRecommendations API.
      public async listRecommendations ( listRecommendationsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listRecommendations." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listRecommendationsRequest . compartmentId , "compartmentIdInSubtree" : listRecommendationsRequest . compartmentIdInSubtree , "categoryId" : listRecommendationsRequest . categoryId , "name" : listRecommendationsRequest . name , "limit" : listRecommendationsRequest . limit , "page" : listRecommendationsRequest . page , "sortOrder" : listRecommendationsRequest . sortOrder , "sortBy" : listRecommendationsRequest . sortBy , "lifecycleState" : listRecommendationsRequest . lifecycleState , "status" : listRecommendationsRequest . status } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listRecommendationsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listRecommendationsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/recommendations" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListRecommendationsResponse > { } , body : await response . json ( ) , bodyKey : "recommendationCollection" , bodyModel : model . RecommendationCollection , type : "model.RecommendationCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListResourceActionQueryableFieldsRequest return throws example Click  https to see how to use ListResourceActionQueryableFields API.
      public async listResourceActionQueryableFields ( listResourceActionQueryableFieldsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listResourceActionQueryableFields." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listResourceActionQueryableFieldsRequest . compartmentId , "compartmentIdInSubtree" : listResourceActionQueryableFieldsRequest . compartmentIdInSubtree , "limit" : listResourceActionQueryableFieldsRequest . limit , "page" : listResourceActionQueryableFieldsRequest . page } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listResourceActionQueryableFieldsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listResourceActionQueryableFieldsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/resourceActions/actions/getQueryableFields" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListResourceActionQueryableFieldsResponse > { } , body : await response . json ( ) , bodyKey : "queryableFieldCollection" , bodyModel : model . QueryableFieldCollection , type : "model.QueryableFieldCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListResourceActionsRequest return throws example Click  https to see how to use ListResourceActions API.
      public async listResourceActions ( listResourceActionsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#listResourceActions." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listResourceActionsRequest . compartmentId , "compartmentIdInSubtree" : listResourceActionsRequest . compartmentIdInSubtree , "recommendationId" : listResourceActionsRequest . recommendationId , "name" : listResourceActionsRequest . name , "resourceType" : listResourceActionsRequest . resourceType , "limit" : listResourceActionsRequest . limit , "page" : listResourceActionsRequest . page , "sortOrder" : listResourceActionsRequest . sortOrder , "sortBy" : listResourceActionsRequest . sortBy , "lifecycleState" : listResourceActionsRequest . lifecycleState , "status" : listResourceActionsRequest . status } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listResourceActionsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listResourceActionsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/resourceActions" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListResourceActionsResponse > { } , body : await response . json ( ) , bodyKey : "resourceActionCollection" , bodyModel : model . ResourceActionCollection , type : "model.ResourceActionCollection" , 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-prev-page" ) , key : "opcPrevPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } 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 OptimizerClient#listWorkRequestErrors." ) ; const pathParams = { "{workRequestId}" : listWorkRequestErrorsRequest . workRequestId } ; const queryParams = { "page" : listWorkRequestErrorsRequest . page , "limit" : listWorkRequestErrorsRequest . limit } ; 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 : "workRequestErrorCollection" , bodyModel : model . WorkRequestErrorCollection , type : "model.WorkRequestErrorCollection" , 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 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 OptimizerClient#listWorkRequestLogs." ) ; const pathParams = { "{workRequestId}" : listWorkRequestLogsRequest . workRequestId } ; const queryParams = { "page" : listWorkRequestLogsRequest . page , "limit" : listWorkRequestLogsRequest . limit } ; 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 : "workRequestLogEntryCollection" , bodyModel : model . WorkRequestLogEntryCollection , type : "model.WorkRequestLogEntryCollection" , 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 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 OptimizerClient#listWorkRequests." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listWorkRequestsRequest . compartmentId , "page" : listWorkRequestsRequest . page , "limit" : listWorkRequestsRequest . limit } ; 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 : "workRequestCollection" , bodyModel : model . WorkRequestCollection , type : "model.WorkRequestCollection" , 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 UpdateEnrollmentStatusRequest return throws example Click  https to see how to use UpdateEnrollmentStatus API.
      public async updateEnrollmentStatus ( updateEnrollmentStatusRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#updateEnrollmentStatus." ) ; const pathParams = { "{enrollmentStatusId}" : updateEnrollmentStatusRequest . enrollmentStatusId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : updateEnrollmentStatusRequest . opcRequestId , "if-match" : updateEnrollmentStatusRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateEnrollmentStatusRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/enrollmentStatus/{enrollmentStatusId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateEnrollmentStatusRequest . updateEnrollmentStatusDetails , "UpdateEnrollmentStatusDetails" , model . UpdateEnrollmentStatusDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateEnrollmentStatusResponse > { } , body : await response . json ( ) , bodyKey : "enrollmentStatus" , bodyModel : model . EnrollmentStatus , type : "model.EnrollmentStatus" , 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 UpdateProfileRequest return throws example Click  https to see how to use UpdateProfile API.
      public async updateProfile ( updateProfileRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#updateProfile." ) ; const pathParams = { "{profileId}" : updateProfileRequest . profileId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateProfileRequest . ifMatch , "opc-request-id" : updateProfileRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateProfileRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/profiles/{profileId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateProfileRequest . updateProfileDetails , "UpdateProfileDetails" , model . UpdateProfileDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateProfileResponse > { } , body : await response . json ( ) , bodyKey : "profile" , bodyModel : model . Profile , type : "model.Profile" , 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 UpdateRecommendationRequest return throws example Click  https to see how to use UpdateRecommendation API.
      public async updateRecommendation ( updateRecommendationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#updateRecommendation." ) ; const pathParams = { "{recommendationId}" : updateRecommendationRequest . recommendationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : updateRecommendationRequest . opcRequestId , "if-match" : updateRecommendationRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateRecommendationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/recommendations/{recommendationId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateRecommendationRequest . updateRecommendationDetails , "UpdateRecommendationDetails" , model . UpdateRecommendationDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateRecommendationResponse > { } , body : await response . json ( ) , bodyKey : "recommendation" , bodyModel : model . Recommendation , type : "model.Recommendation" , 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 UpdateResourceActionRequest return throws example Click  https to see how to use UpdateResourceAction API.
      public async updateResourceAction ( updateResourceActionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation OptimizerClient#updateResourceAction." ) ; const pathParams = { "{resourceActionId}" : updateResourceActionRequest . resourceActionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : updateResourceActionRequest . opcRequestId , "if-match" : updateResourceActionRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateResourceActionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/resourceActions/{resourceActionId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateResourceActionRequest . updateResourceActionDetails , "UpdateResourceActionDetails" , model . UpdateResourceActionDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateResourceActionResponse > { } , body : await response . json ( ) , bodyKey : "resourceAction" , bodyModel : model . ResourceAction , type : "model.ResourceAction" , 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 ; } } }