/**
 * Oracle Cloud VMware Solution API
 * Use the Oracle Cloud VMware API to create SDDCs and manage ESXi hosts and software.
For more information, see [Oracle Cloud VMware Solution](/iaas/Content/VMware/Concepts/ocvsoverview.htm).

 * OpenAPI spec version: 20200501
 *
 *
 * 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 { EsxiHostWaiter } from "./esxihost-waiter" ; import { SddcWaiter } from "./sddc-waiter" ; import { WorkRequestWaiter } from "./workrequest-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum EsxiHostApiKeys { } /**
 * 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 EsxiHostClient { protected static serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : EsxiHostWaiter ; 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 + "/20200501" ; if ( this . logger ) this . logger . info ( `EsxiHostClient 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 ( EsxiHostClient . 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 ( EsxiHostClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new EsxiHostWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } /**
       * Adds another ESXi host to an existing SDDC. The attributes of the specified
  * `Sddc` determine the VMware software and other configuration settings used
  * by the ESXi host.
  * <p>
  Use the  WorkRequest operations to track the
  * creation of the ESXi host.
  *
       * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
       *  param CreateEsxiHostRequest return throws example Click  https to see how to use CreateEsxiHost API.
        public async createEsxiHost ( createEsxiHostRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation EsxiHostClient#createEsxiHost." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createEsxiHostRequest . opcRetryToken , "opc-request-id" : createEsxiHostRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createEsxiHostRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/esxiHosts" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createEsxiHostRequest . createEsxiHostDetails , "CreateEsxiHostDetails" , model . CreateEsxiHostDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateEsxiHostResponse > { } , 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 ; } } /**
       * Deletes the specified ESXi host. Before deleting the host, back up or
  * migrate any VMware workloads running on it.
  * <p>
  When you delete an ESXi host, Oracle does not remove the node
  * configuration within the VMware environment itself. That is
  * your responsibility.
  * <p>
  **Note:** If you delete EXSi hosts from the SDDC to total less than 3,
  * you are still billed for the 3 minimum recommended EXSi hosts. Also,
  * you cannot add more VMware workloads to the SDDC until it again has at
  * least 3 ESXi hosts.
  * <p>
  Use the  WorkRequest operations to track the
  * deletion of the ESXi host.
  *
       * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
       *  param DeleteEsxiHostRequest return throws example Click  https to see how to use DeleteEsxiHost API.
        public async deleteEsxiHost ( deleteEsxiHostRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation EsxiHostClient#deleteEsxiHost." ) ; const pathParams = { "{esxiHostId}" : deleteEsxiHostRequest . esxiHostId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteEsxiHostRequest . ifMatch , "opc-request-id" : deleteEsxiHostRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteEsxiHostRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/esxiHosts/{esxiHostId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteEsxiHostResponse > { } , 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 ; } } /**
     * Gets the specified ESXi host's information.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param GetEsxiHostRequest return throws example Click  https to see how to use GetEsxiHost API.
      public async getEsxiHost ( getEsxiHostRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation EsxiHostClient#getEsxiHost." ) ; const pathParams = { "{esxiHostId}" : getEsxiHostRequest . esxiHostId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getEsxiHostRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getEsxiHostRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/esxiHosts/{esxiHostId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetEsxiHostResponse > { } , body : await response . json ( ) , bodyKey : "esxiHost" , bodyModel : model . EsxiHost , type : "model.EsxiHost" , 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 ; } } /**
       * Lists the ESXi hosts in the specified SDDC. The list can be filtered
  * by Compute instance OCID or ESXi display name.
  * <p>
  Remember that in terms of implementation, an ESXi host is a Compute instance that
  * is configured with the chosen bundle of VMware software. Each `EsxiHost`
  * object has its own OCID (`id`), and a separate attribute for the OCID of
  * the Compute instance (`computeInstanceId`). When filtering the list of
  * ESXi hosts, you can specify the OCID of the Compute instance, not the
  * ESXi host OCID.
  *
       * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
       *  param ListEsxiHostsRequest return throws example Click  https to see how to use ListEsxiHosts API.
        public async listEsxiHosts ( listEsxiHostsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation EsxiHostClient#listEsxiHosts." ) ; const pathParams = { } ; const queryParams = { "sddcId" : listEsxiHostsRequest . sddcId , "computeInstanceId" : listEsxiHostsRequest . computeInstanceId , "displayName" : listEsxiHostsRequest . displayName , "limit" : listEsxiHostsRequest . limit , "page" : listEsxiHostsRequest . page , "sortOrder" : listEsxiHostsRequest . sortOrder , "sortBy" : listEsxiHostsRequest . sortBy , "lifecycleState" : listEsxiHostsRequest . lifecycleState } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listEsxiHostsRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listEsxiHostsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/esxiHosts" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListEsxiHostsResponse > { } , body : await response . json ( ) , bodyKey : "esxiHostCollection" , bodyModel : model . EsxiHostCollection , type : "model.EsxiHostCollection" , 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 ; } } /**
     * Updates the specified ESXi host.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param UpdateEsxiHostRequest return throws example Click  https to see how to use UpdateEsxiHost API.
      public async updateEsxiHost ( updateEsxiHostRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation EsxiHostClient#updateEsxiHost." ) ; const pathParams = { "{esxiHostId}" : updateEsxiHostRequest . esxiHostId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateEsxiHostRequest . ifMatch , "opc-request-id" : updateEsxiHostRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateEsxiHostRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/esxiHosts/{esxiHostId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateEsxiHostRequest . updateEsxiHostDetails , "UpdateEsxiHostDetails" , model . UpdateEsxiHostDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateEsxiHostResponse > { } , body : await response . json ( ) , bodyKey : "esxiHost" , bodyModel : model . EsxiHost , type : "model.EsxiHost" , 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 ; } } } export enum SddcApiKeys { } /**
 * 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 SddcClient { protected static serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : SddcWaiter ; 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 + "/20200501" ; if ( this . logger ) this . logger . info ( `SddcClient 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 ( SddcClient . 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 ( SddcClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new SddcWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } /**
     * Cancel the pending SDDC downgrade from HCX Enterprise to HCX Advanced.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param CancelDowngradeHcxRequest return throws example Click  https to see how to use CancelDowngradeHcx API.
      public async cancelDowngradeHcx ( cancelDowngradeHcxRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#cancelDowngradeHcx." ) ; const pathParams = { "{sddcId}" : cancelDowngradeHcxRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : cancelDowngradeHcxRequest . opcRetryToken , "if-match" : cancelDowngradeHcxRequest . ifMatch , "opc-request-id" : cancelDowngradeHcxRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , cancelDowngradeHcxRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}/actions/cancelDowngradeHcx" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CancelDowngradeHcxResponse > { } , 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 ; } } /**
     * Moves an SDDC into a different compartment within the same tenancy. For information
     * about moving resources between compartments, see
     * [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param ChangeSddcCompartmentRequest return throws example Click  https to see how to use ChangeSddcCompartment API.
      public async changeSddcCompartment ( changeSddcCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#changeSddcCompartment." ) ; const pathParams = { "{sddcId}" : changeSddcCompartmentRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeSddcCompartmentRequest . ifMatch , "opc-request-id" : changeSddcCompartmentRequest . opcRequestId , "opc-retry-token" : changeSddcCompartmentRequest . opcRetryToken } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeSddcCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeSddcCompartmentRequest . changeSddcCompartmentDetails , "ChangeSddcCompartmentDetails" , model . ChangeSddcCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeSddcCompartmentResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } /**
       * Creates an Oracle Cloud VMware Solution software-defined data center (SDDC).
  * <p>
  Use the  WorkRequest operations to track the
  * creation of the SDDC.
  * <p>
  **Important:** You must configure the SDDC's networking resources with the security rules detailed in [Security Rules for Oracle Cloud VMware Solution SDDCs](https://docs.cloud.oracle.com/iaas/Content/VMware/Reference/ocvssecurityrules.htm). Otherwise, provisioning the SDDC will fail. The rules are based on the requirements set by VMware.
  *
       * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
       *  param CreateSddcRequest return throws example Click  https to see how to use CreateSddc API.
        public async createSddc ( createSddcRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#createSddc." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createSddcRequest . opcRetryToken , "opc-request-id" : createSddcRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createSddcRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createSddcRequest . createSddcDetails , "CreateSddcDetails" , model . CreateSddcDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateSddcResponse > { } , 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 ; } } /**
       * Deletes the specified SDDC, along with the other resources that were
  * created with the SDDC. For example: the Compute instances, DNS records,
  * and so on.
  * <p>
  Use the  WorkRequest operations to track the
  * deletion of the SDDC.
  *
       * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
       *  param DeleteSddcRequest return throws example Click  https to see how to use DeleteSddc API.
        public async deleteSddc ( deleteSddcRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#deleteSddc." ) ; const pathParams = { "{sddcId}" : deleteSddcRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteSddcRequest . ifMatch , "opc-request-id" : deleteSddcRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteSddcRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteSddcResponse > { } , 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 ; } } /**
     * Downgrade the specified SDDC from HCX Enterprise to HCX Advanced.
     * Downgrading from HCX Enterprise to HCX Advanced reduces the number of provided license keys from 10 to 3.
     * Downgrade remains in a `PENDING` state until the end of the current billing cycle. You can use  {@link #cancelDowngradeHcx(CancelDowngradeHcxRequest) cancelDowngradeHcx} * to cancel the downgrade while it's still in a `PENDING` state.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param DowngradeHcxRequest return throws example Click  https to see how to use DowngradeHcx API.
      public async downgradeHcx ( downgradeHcxRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#downgradeHcx." ) ; const pathParams = { "{sddcId}" : downgradeHcxRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : downgradeHcxRequest . opcRetryToken , "if-match" : downgradeHcxRequest . ifMatch , "opc-request-id" : downgradeHcxRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , downgradeHcxRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}/actions/downgradeHcx" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( downgradeHcxRequest . downgradeHcxDetails , "DowngradeHcxDetails" , model . DowngradeHcxDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DowngradeHcxResponse > { } , 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 ; } } /**
     * Gets the specified SDDC's information.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param GetSddcRequest return throws example Click  https to see how to use GetSddc API.
      public async getSddc ( getSddcRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#getSddc." ) ; const pathParams = { "{sddcId}" : getSddcRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getSddcRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getSddcRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetSddcResponse > { } , body : await response . json ( ) , bodyKey : "sddc" , bodyModel : model . Sddc , type : "model.Sddc" , 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 ; } } /**
     * Lists the SDDCs in the specified compartment. The list can be
     * filtered by display name or availability domain.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param ListSddcsRequest return throws example Click  https to see how to use ListSddcs API.
      public async listSddcs ( listSddcsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#listSddcs." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listSddcsRequest . compartmentId , "computeAvailabilityDomain" : listSddcsRequest . computeAvailabilityDomain , "displayName" : listSddcsRequest . displayName , "limit" : listSddcsRequest . limit , "page" : listSddcsRequest . page , "sortOrder" : listSddcsRequest . sortOrder , "sortBy" : listSddcsRequest . sortBy , "lifecycleState" : listSddcsRequest . lifecycleState } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listSddcsRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listSddcsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListSddcsResponse > { } , body : await response . json ( ) , bodyKey : "sddcCollection" , bodyModel : model . SddcCollection , type : "model.SddcCollection" , 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 ; } } /**
     * Lists supported SKUs.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param ListSupportedSkusRequest return throws example Click  https to see how to use ListSupportedSkus API.
      public async listSupportedSkus ( listSupportedSkusRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#listSupportedSkus." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listSupportedSkusRequest . compartmentId , "limit" : listSupportedSkusRequest . limit , "page" : listSupportedSkusRequest . page } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listSupportedSkusRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listSupportedSkusRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/supportedSkus" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListSupportedSkusResponse > { } , body : await response . json ( ) , bodyKey : "supportedSkuSummaryCollection" , bodyModel : model . SupportedSkuSummaryCollection , type : "model.SupportedSkuSummaryCollection" , 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 ; } } /**
     * Lists the versions of bundled VMware software supported by the Oracle Cloud
     * VMware Solution.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param ListSupportedVmwareSoftwareVersionsRequest return throws example Click  https to see how to use ListSupportedVmwareSoftwareVersions API.
      public async listSupportedVmwareSoftwareVersions ( listSupportedVmwareSoftwareVersionsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#listSupportedVmwareSoftwareVersions." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listSupportedVmwareSoftwareVersionsRequest . compartmentId , "limit" : listSupportedVmwareSoftwareVersionsRequest . limit , "page" : listSupportedVmwareSoftwareVersionsRequest . page } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listSupportedVmwareSoftwareVersionsRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listSupportedVmwareSoftwareVersionsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/supportedVmwareSoftwareVersions" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListSupportedVmwareSoftwareVersionsResponse > { } , body : await response . json ( ) , bodyKey : "supportedVmwareSoftwareVersionCollection" , bodyModel : model . SupportedVmwareSoftwareVersionCollection , type : "model.SupportedVmwareSoftwareVersionCollection" , 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 ; } } /**
     * Refresh HCX on-premise licenses status of the specified SDDC.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param RefreshHcxLicenseStatusRequest return throws example Click  https to see how to use RefreshHcxLicenseStatus API.
      public async refreshHcxLicenseStatus ( refreshHcxLicenseStatusRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#refreshHcxLicenseStatus." ) ; const pathParams = { "{sddcId}" : refreshHcxLicenseStatusRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : refreshHcxLicenseStatusRequest . opcRetryToken , "if-match" : refreshHcxLicenseStatusRequest . ifMatch , "opc-request-id" : refreshHcxLicenseStatusRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , refreshHcxLicenseStatusRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}/actions/refreshHcxLicenses" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . RefreshHcxLicenseStatusResponse > { } , 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 ; } } /**
     * Updates the specified SDDC.
     * <p>
     **Important:** Updating an SDDC affects only certain attributes in the `Sddc`
     * object and does not affect the VMware environment currently running in
     * the SDDC. For more information, see
     *  {@link #updateSddcDetails(UpdateSddcDetailsRequest) updateSddcDetails} .
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param UpdateSddcRequest return throws example Click  https to see how to use UpdateSddc API.
      public async updateSddc ( updateSddcRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#updateSddc." ) ; const pathParams = { "{sddcId}" : updateSddcRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateSddcRequest . ifMatch , "opc-request-id" : updateSddcRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateSddcRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateSddcRequest . updateSddcDetails , "UpdateSddcDetails" , model . UpdateSddcDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateSddcResponse > { } , body : await response . json ( ) , bodyKey : "sddc" , bodyModel : model . Sddc , type : "model.Sddc" , 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 ; } } /**
     * Upgrade the specified SDDC from HCX Advanced to HCX Enterprise.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param UpgradeHcxRequest return throws example Click  https to see how to use UpgradeHcx API.
      public async upgradeHcx ( upgradeHcxRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation SddcClient#upgradeHcx." ) ; const pathParams = { "{sddcId}" : upgradeHcxRequest . sddcId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : upgradeHcxRequest . opcRetryToken , "if-match" : upgradeHcxRequest . ifMatch , "opc-request-id" : upgradeHcxRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , upgradeHcxRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/sddcs/{sddcId}/actions/upgradeHcx" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpgradeHcxResponse > { } , 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 ; } } } export enum WorkRequestApiKeys { } /**
 * 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 WorkRequestClient { protected static serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : WorkRequestWaiter ; 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 + "/20200501" ; if ( this . logger ) this . logger . info ( `WorkRequestClient 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 ( WorkRequestClient . 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 ( WorkRequestClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new WorkRequestWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } /**
     * Gets the specified work request's information.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  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 WorkRequestClient#getWorkRequest." ) ; const pathParams = { "{workRequestId}" : getWorkRequestRequest . workRequestId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getWorkRequestRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; 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 ; } } /**
     * Lists the errors for the specified work request.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  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 WorkRequestClient#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 . OciSdkDefaultRetryConfiguration ; 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 ; } } /**
     * Lists the logs for the specified work request.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  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 WorkRequestClient#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 . OciSdkDefaultRetryConfiguration ; 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 ; } } /**
     * Lists the work requests in the specified compartment.
     *
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  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 WorkRequestClient#listWorkRequests." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listWorkRequestsRequest . compartmentId , "resourceId" : listWorkRequestsRequest . resourceId , "page" : listWorkRequestsRequest . page , "limit" : listWorkRequestsRequest . limit } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listWorkRequestsRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; 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 ; } } }