/**
 * Application Performance Monitoring Control Plane API
 * Use the Application Performance Monitoring Control Plane API to perform operations such as creating, updating,
deleting and listing APM domains and monitoring the progress of these operations using the work request APIs.

 * OpenAPI spec version: 20200630
 *
 *
 * 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 { ApmDomainWaiter } from "./apmdomain-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum ApmDomainApiKeys { } /**
 * 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 ApmDomainClient { protected static serviceEndpointTemplate = "https://apm-cp.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : ApmDomainWaiter ; 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 + "/20200630" ; if ( this . logger ) this . logger . info ( `ApmDomainClient 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 ( ApmDomainClient . 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 ( ApmDomainClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new ApmDomainWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param ChangeApmDomainCompartmentRequest return throws example Click  https to see how to use ChangeApmDomainCompartment API.
      public async changeApmDomainCompartment ( changeApmDomainCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#changeApmDomainCompartment." ) ; const pathParams = { "{apmDomainId}" : changeApmDomainCompartmentRequest . apmDomainId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeApmDomainCompartmentRequest . ifMatch , "opc-request-id" : changeApmDomainCompartmentRequest . opcRequestId , "opc-retry-token" : changeApmDomainCompartmentRequest . opcRetryToken } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeApmDomainCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeApmDomainCompartmentRequest . changeApmDomainCompartmentDetails , "ChangeApmDomainCompartmentDetails" , model . ChangeApmDomainCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeApmDomainCompartmentResponse > { } , 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 CreateApmDomainRequest return throws example Click  https to see how to use CreateApmDomain API.
      public async createApmDomain ( createApmDomainRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#createApmDomain." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createApmDomainRequest . opcRetryToken , "opc-request-id" : createApmDomainRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createApmDomainRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createApmDomainRequest . createApmDomainDetails , "CreateApmDomainDetails" , model . CreateApmDomainDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateApmDomainResponse > { } , 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 DeleteApmDomainRequest return throws example Click  https to see how to use DeleteApmDomain API.
      public async deleteApmDomain ( deleteApmDomainRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#deleteApmDomain." ) ; const pathParams = { "{apmDomainId}" : deleteApmDomainRequest . apmDomainId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteApmDomainRequest . ifMatch , "opc-request-id" : deleteApmDomainRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteApmDomainRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteApmDomainResponse > { } , 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 GenerateDataKeysRequest return throws example Click  https to see how to use GenerateDataKeys API.
      public async generateDataKeys ( generateDataKeysRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#generateDataKeys." ) ; const pathParams = { "{apmDomainId}" : generateDataKeysRequest . apmDomainId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : generateDataKeysRequest . ifMatch , "opc-request-id" : generateDataKeysRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , generateDataKeysRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}/actions/generateDataKeys" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( generateDataKeysRequest . generateDataKeysListDetails , "Array<model.GenerateDataKeyDetails>" , model . GenerateDataKeyDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GenerateDataKeysResponse > { } , 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 GetApmDomainRequest return throws example Click  https to see how to use GetApmDomain API.
      public async getApmDomain ( getApmDomainRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#getApmDomain." ) ; const pathParams = { "{apmDomainId}" : getApmDomainRequest . apmDomainId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getApmDomainRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getApmDomainRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetApmDomainResponse > { } , body : await response . json ( ) , bodyKey : "apmDomain" , bodyModel : model . ApmDomain , type : "model.ApmDomain" , 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 ApmDomainClient#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 ListApmDomainWorkRequestsRequest return throws example Click  https to see how to use ListApmDomainWorkRequests API.
      public async listApmDomainWorkRequests ( listApmDomainWorkRequestsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#listApmDomainWorkRequests." ) ; const pathParams = { "{apmDomainId}" : listApmDomainWorkRequestsRequest . apmDomainId } ; const queryParams = { "page" : listApmDomainWorkRequestsRequest . page , "limit" : listApmDomainWorkRequestsRequest . limit } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listApmDomainWorkRequestsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listApmDomainWorkRequestsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}/workRequests" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListApmDomainWorkRequestsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . WorkRequest , type : "Array<model.WorkRequest>" , 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 listAllApmDomainWorkRequests ( request ) { return paginateRecords ( request , req => this . listApmDomainWorkRequests ( req ) ) ; } param request public listAllApmDomainWorkRequestsResponses ( request ) { return paginateResponses ( request , req => this . listApmDomainWorkRequests ( req ) ) ; } param request public listApmDomainWorkRequestsRecordIterator ( request ) { return paginateRecords ( request , req => this . listApmDomainWorkRequests ( req ) ) ; } param request public listApmDomainWorkRequestsResponseIterator ( request ) { return paginateResponses ( request , req => this . listApmDomainWorkRequests ( req ) ) ; } param ListApmDomainsRequest return throws example Click  https to see how to use ListApmDomains API.
      public async listApmDomains ( listApmDomainsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#listApmDomains." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listApmDomainsRequest . compartmentId , "displayName" : listApmDomainsRequest . displayName , "lifecycleState" : listApmDomainsRequest . lifecycleState , "limit" : listApmDomainsRequest . limit , "page" : listApmDomainsRequest . page , "sortOrder" : listApmDomainsRequest . sortOrder , "sortBy" : listApmDomainsRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listApmDomainsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listApmDomainsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListApmDomainsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . ApmDomainSummary , type : "Array<model.ApmDomainSummary>" , 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 listAllApmDomains ( request ) { return paginateRecords ( request , req => this . listApmDomains ( req ) ) ; } param request public listAllApmDomainsResponses ( request ) { return paginateResponses ( request , req => this . listApmDomains ( req ) ) ; } param request public listApmDomainsRecordIterator ( request ) { return paginateRecords ( request , req => this . listApmDomains ( req ) ) ; } param request public listApmDomainsResponseIterator ( request ) { return paginateResponses ( request , req => this . listApmDomains ( req ) ) ; } param ListDataKeysRequest return throws example Click  https to see how to use ListDataKeys API.
      public async listDataKeys ( listDataKeysRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#listDataKeys." ) ; const pathParams = { "{apmDomainId}" : listDataKeysRequest . apmDomainId } ; const queryParams = { "dataKeyType" : listDataKeysRequest . dataKeyType } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listDataKeysRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listDataKeysRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}/dataKeys" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListDataKeysResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . DataKeySummary , type : "Array<model.DataKeySummary>" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , 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 ApmDomainClient#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 : "items" , bodyModel : model . WorkRequestError , type : "Array<model.WorkRequestError>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllWorkRequestErrors ( request ) { return paginateRecords ( request , req => this . listWorkRequestErrors ( req ) ) ; } param request public listAllWorkRequestErrorsResponses ( request ) { return paginateResponses ( request , req => this . listWorkRequestErrors ( req ) ) ; } param request public listWorkRequestErrorsRecordIterator ( request ) { return paginateRecords ( request , req => this . listWorkRequestErrors ( req ) ) ; } param request public listWorkRequestErrorsResponseIterator ( request ) { return paginateResponses ( request , req => this . listWorkRequestErrors ( req ) ) ; } param ListWorkRequestLogsRequest return throws example Click  https to see how to use ListWorkRequestLogs API.
      public async listWorkRequestLogs ( listWorkRequestLogsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#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 : "items" , bodyModel : model . WorkRequestLogEntry , type : "Array<model.WorkRequestLogEntry>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllWorkRequestLogs ( request ) { return paginateRecords ( request , req => this . listWorkRequestLogs ( req ) ) ; } param request public listAllWorkRequestLogsResponses ( request ) { return paginateResponses ( request , req => this . listWorkRequestLogs ( req ) ) ; } param request public listWorkRequestLogsRecordIterator ( request ) { return paginateRecords ( request , req => this . listWorkRequestLogs ( req ) ) ; } param request public listWorkRequestLogsResponseIterator ( request ) { return paginateResponses ( request , req => this . listWorkRequestLogs ( req ) ) ; } param ListWorkRequestsRequest return throws example Click  https to see how to use ListWorkRequests API.
      public async listWorkRequests ( listWorkRequestsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#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 : "items" , bodyModel : model . WorkRequest , type : "Array<model.WorkRequest>" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllWorkRequests ( request ) { return paginateRecords ( request , req => this . listWorkRequests ( req ) ) ; } param request public listAllWorkRequestsResponses ( request ) { return paginateResponses ( request , req => this . listWorkRequests ( req ) ) ; } param request public listWorkRequestsRecordIterator ( request ) { return paginateRecords ( request , req => this . listWorkRequests ( req ) ) ; } param request public listWorkRequestsResponseIterator ( request ) { return paginateResponses ( request , req => this . listWorkRequests ( req ) ) ; } param RemoveDataKeysRequest return throws example Click  https to see how to use RemoveDataKeys API.
      public async removeDataKeys ( removeDataKeysRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#removeDataKeys." ) ; const pathParams = { "{apmDomainId}" : removeDataKeysRequest . apmDomainId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : removeDataKeysRequest . ifMatch , "opc-request-id" : removeDataKeysRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , removeDataKeysRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}/actions/removeDataKeys" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( removeDataKeysRequest . removeDataKeysListDetails , "Array<model.RemoveDataKeyDetails>" , model . RemoveDataKeyDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . RemoveDataKeysResponse > { } , 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 UpdateApmDomainRequest return throws example Click  https to see how to use UpdateApmDomain API.
      public async updateApmDomain ( updateApmDomainRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmDomainClient#updateApmDomain." ) ; const pathParams = { "{apmDomainId}" : updateApmDomainRequest . apmDomainId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateApmDomainRequest . ifMatch , "opc-request-id" : updateApmDomainRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateApmDomainRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/apmDomains/{apmDomainId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateApmDomainRequest . updateApmDomainDetails , "UpdateApmDomainDetails" , model . UpdateApmDomainDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateApmDomainResponse > { } , 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 ; } } }