/**
 * Application Performance Monitoring Synthetic Monitoring API
 * Use the Application Performance Monitoring Synthetic Monitoring API to query synthetic scripts and monitors.
 * 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 { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum ApmSyntheticApiKeys { } /**
 * 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 ApmSyntheticClient { protected static serviceEndpointTemplate = "https://apm-synthetic.{region}.oci.{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 + "/20200630" ; if ( this . logger ) this . logger . info ( `ApmSyntheticClient 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 ( ApmSyntheticClient . 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 ( ApmSyntheticClient . serviceEndpointTemplate , regionId ) ; } param CreateMonitorRequest return throws example Click  https to see how to use CreateMonitor API.
      public async createMonitor ( createMonitorRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#createMonitor." ) ; const pathParams = { } ; const queryParams = { "apmDomainId" : createMonitorRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createMonitorRequest . opcRetryToken , "opc-request-id" : createMonitorRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createMonitorRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/monitors" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createMonitorRequest . createMonitorDetails , "CreateMonitorDetails" , model . CreateMonitorDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateMonitorResponse > { } , body : await response . json ( ) , bodyKey : "monitor" , bodyModel : model . Monitor , type : "model.Monitor" , 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 CreateScriptRequest return throws example Click  https to see how to use CreateScript API.
      public async createScript ( createScriptRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#createScript." ) ; const pathParams = { } ; const queryParams = { "apmDomainId" : createScriptRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createScriptRequest . opcRetryToken , "opc-request-id" : createScriptRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createScriptRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/scripts" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createScriptRequest . createScriptDetails , "CreateScriptDetails" , model . CreateScriptDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateScriptResponse > { } , body : await response . json ( ) , bodyKey : "script" , bodyModel : model . Script , type : "model.Script" , 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 DeleteMonitorRequest return throws example Click  https to see how to use DeleteMonitor API.
      public async deleteMonitor ( deleteMonitorRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#deleteMonitor." ) ; const pathParams = { "{monitorId}" : deleteMonitorRequest . monitorId } ; const queryParams = { "apmDomainId" : deleteMonitorRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteMonitorRequest . ifMatch , "opc-request-id" : deleteMonitorRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteMonitorRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/monitors/{monitorId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteMonitorResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param DeleteScriptRequest return throws example Click  https to see how to use DeleteScript API.
      public async deleteScript ( deleteScriptRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#deleteScript." ) ; const pathParams = { "{scriptId}" : deleteScriptRequest . scriptId } ; const queryParams = { "apmDomainId" : deleteScriptRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteScriptRequest . ifMatch , "opc-request-id" : deleteScriptRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteScriptRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/scripts/{scriptId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteScriptResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetMonitorRequest return throws example Click  https to see how to use GetMonitor API.
      public async getMonitor ( getMonitorRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#getMonitor." ) ; const pathParams = { "{monitorId}" : getMonitorRequest . monitorId } ; const queryParams = { "apmDomainId" : getMonitorRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getMonitorRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getMonitorRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/monitors/{monitorId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetMonitorResponse > { } , body : await response . json ( ) , bodyKey : "monitor" , bodyModel : model . Monitor , type : "model.Monitor" , 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 GetMonitorResultRequest return throws example Click  https to see how to use GetMonitorResult API.
      public async getMonitorResult ( getMonitorResultRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#getMonitorResult." ) ; const pathParams = { "{monitorId}" : getMonitorResultRequest . monitorId , "{executionTime}" : getMonitorResultRequest . executionTime } ; const queryParams = { "apmDomainId" : getMonitorResultRequest . apmDomainId , "vantagePoint" : getMonitorResultRequest . vantagePoint , "resultType" : getMonitorResultRequest . resultType , "resultContentType" : getMonitorResultRequest . resultContentType } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getMonitorResultRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getMonitorResultRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/monitors/{monitorId}/results/{executionTime}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetMonitorResultResponse > { } , body : await response . json ( ) , bodyKey : "monitorResult" , bodyModel : model . MonitorResult , type : "model.MonitorResult" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetScriptRequest return throws example Click  https to see how to use GetScript API.
      public async getScript ( getScriptRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#getScript." ) ; const pathParams = { "{scriptId}" : getScriptRequest . scriptId } ; const queryParams = { "apmDomainId" : getScriptRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getScriptRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getScriptRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/scripts/{scriptId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetScriptResponse > { } , body : await response . json ( ) , bodyKey : "script" , bodyModel : model . Script , type : "model.Script" , 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 ListMonitorsRequest return throws example Click  https to see how to use ListMonitors API.
      public async listMonitors ( listMonitorsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#listMonitors." ) ; const pathParams = { } ; const queryParams = { "apmDomainId" : listMonitorsRequest . apmDomainId , "displayName" : listMonitorsRequest . displayName , "scriptId" : listMonitorsRequest . scriptId , "monitorType" : listMonitorsRequest . monitorType , "status" : listMonitorsRequest . status , "limit" : listMonitorsRequest . limit , "page" : listMonitorsRequest . page , "sortOrder" : listMonitorsRequest . sortOrder , "sortBy" : listMonitorsRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listMonitorsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listMonitorsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/monitors" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListMonitorsResponse > { } , body : await response . json ( ) , bodyKey : "monitorCollection" , bodyModel : model . MonitorCollection , type : "model.MonitorCollection" , 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 ListPublicVantagePointsRequest return throws example Click  https to see how to use ListPublicVantagePoints API.
      public async listPublicVantagePoints ( listPublicVantagePointsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#listPublicVantagePoints." ) ; const pathParams = { } ; const queryParams = { "apmDomainId" : listPublicVantagePointsRequest . apmDomainId , "limit" : listPublicVantagePointsRequest . limit , "page" : listPublicVantagePointsRequest . page , "sortOrder" : listPublicVantagePointsRequest . sortOrder , "sortBy" : listPublicVantagePointsRequest . sortBy , "displayName" : listPublicVantagePointsRequest . displayName , "name" : listPublicVantagePointsRequest . name } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listPublicVantagePointsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listPublicVantagePointsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/publicVantagePoints" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListPublicVantagePointsResponse > { } , body : await response . json ( ) , bodyKey : "publicVantagePointCollection" , bodyModel : model . PublicVantagePointCollection , type : "model.PublicVantagePointCollection" , 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 ListScriptsRequest return throws example Click  https to see how to use ListScripts API.
      public async listScripts ( listScriptsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#listScripts." ) ; const pathParams = { } ; const queryParams = { "apmDomainId" : listScriptsRequest . apmDomainId , "displayName" : listScriptsRequest . displayName , "contentType" : listScriptsRequest . contentType , "limit" : listScriptsRequest . limit , "page" : listScriptsRequest . page , "sortOrder" : listScriptsRequest . sortOrder , "sortBy" : listScriptsRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listScriptsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listScriptsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/scripts" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListScriptsResponse > { } , body : await response . json ( ) , bodyKey : "scriptCollection" , bodyModel : model . ScriptCollection , type : "model.ScriptCollection" , 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 UpdateMonitorRequest return throws example Click  https to see how to use UpdateMonitor API.
      public async updateMonitor ( updateMonitorRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#updateMonitor." ) ; const pathParams = { "{monitorId}" : updateMonitorRequest . monitorId } ; const queryParams = { "apmDomainId" : updateMonitorRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateMonitorRequest . ifMatch , "opc-request-id" : updateMonitorRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateMonitorRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/monitors/{monitorId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateMonitorRequest . updateMonitorDetails , "UpdateMonitorDetails" , model . UpdateMonitorDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateMonitorResponse > { } , body : await response . json ( ) , bodyKey : "monitor" , bodyModel : model . Monitor , type : "model.Monitor" , 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 UpdateScriptRequest return throws example Click  https to see how to use UpdateScript API.
      public async updateScript ( updateScriptRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation ApmSyntheticClient#updateScript." ) ; const pathParams = { "{scriptId}" : updateScriptRequest . scriptId } ; const queryParams = { "apmDomainId" : updateScriptRequest . apmDomainId } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateScriptRequest . ifMatch , "opc-request-id" : updateScriptRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateScriptRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/scripts/{scriptId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateScriptRequest . updateScriptDetails , "UpdateScriptDetails" , model . UpdateScriptDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateScriptResponse > { } , body : await response . json ( ) , bodyKey : "script" , bodyModel : model . Script , type : "model.Script" , 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 ; } } }