/**
 * Functions Service API
 * API for the Functions service.

 * OpenAPI spec version: 20181201
 *
 *
 * 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 { FunctionsManagementWaiter } from "./functionsmanagement-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum FunctionsInvokeApiKeys { } /**
 * 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 FunctionsInvokeClient { protected static serviceEndpointTemplate = "https://functions.{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 ) ; } /**
     * 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 + "/20181201" ; if ( this . logger ) this . logger . info ( `FunctionsInvokeClient endpoint set to ${ this . _endpoint }` ) ; } public get logger ( ) { return common . LOG . logger ; } param InvokeFunctionRequest return throws example Click  https to see how to use InvokeFunction API.
      public async invokeFunction ( invokeFunctionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsInvokeClient#invokeFunction." ) ; const pathParams = { "{functionId}" : invokeFunctionRequest . functionId } ; const queryParams = { } ; let headerParams = { "fn-intent" : invokeFunctionRequest . fnIntent , "fn-invoke-type" : invokeFunctionRequest . fnInvokeType , "opc-request-id" : invokeFunctionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , invokeFunctionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/functions/{functionId}/actions/invoke" , method : "POST" , bodyContent : invokeFunctionRequest . invokeFunctionBody , pathParams : pathParams , headerParams : headerParams , backupBinaryBody : retrier . backUpBinaryBody , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . InvokeFunctionResponse > { } , body : response . body ! , bodyKey : "value" , bodyModel : "string" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } } export enum FunctionsManagementApiKeys { } /**
 * 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 FunctionsManagementClient { protected static serviceEndpointTemplate = "https://functions.{region}.oci.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : FunctionsManagementWaiter ; 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 + "/20181201" ; if ( this . logger ) this . logger . info ( `FunctionsManagementClient 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 ( FunctionsManagementClient . 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 ( FunctionsManagementClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new FunctionsManagementWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } /**
     * Moves an application into a different compartment within the same tenancy.
     * For information about moving resources between compartments, see [Moving Resources Between Compartments](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 ChangeApplicationCompartmentRequest return throws example Click  https to see how to use ChangeApplicationCompartment API.
      public async changeApplicationCompartment ( changeApplicationCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#changeApplicationCompartment." ) ; const pathParams = { "{applicationId}" : changeApplicationCompartmentRequest . applicationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : changeApplicationCompartmentRequest . ifMatch , "opc-request-id" : changeApplicationCompartmentRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeApplicationCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/applications/{applicationId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeApplicationCompartmentRequest . changeApplicationCompartmentDetails , "ChangeApplicationCompartmentDetails" , model . ChangeApplicationCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeApplicationCompartmentResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } /**
     * Creates a new application.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param CreateApplicationRequest return throws example Click  https to see how to use CreateApplication API.
      public async createApplication ( createApplicationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#createApplication." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createApplicationRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createApplicationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/applications" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createApplicationRequest . createApplicationDetails , "CreateApplicationDetails" , model . CreateApplicationDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateApplicationResponse > { } , body : await response . json ( ) , bodyKey : "application" , bodyModel : model . Application , type : "model.Application" , 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 ; } } /**
     * Creates a new function.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param CreateFunctionRequest return throws example Click  https to see how to use CreateFunction API.
      public async createFunction ( createFunctionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#createFunction." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : createFunctionRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createFunctionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/functions" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createFunctionRequest . createFunctionDetails , "CreateFunctionDetails" , model . CreateFunctionDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateFunctionResponse > { } , body : await response . json ( ) , bodyKey : "function" , bodyModel : model . Function , type : "model.Function" , 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 ; } } /**
     * Deletes an application.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param DeleteApplicationRequest return throws example Click  https to see how to use DeleteApplication API.
      public async deleteApplication ( deleteApplicationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#deleteApplication." ) ; const pathParams = { "{applicationId}" : deleteApplicationRequest . applicationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteApplicationRequest . ifMatch , "opc-request-id" : deleteApplicationRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteApplicationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/applications/{applicationId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteApplicationResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } /**
     * Deletes a function.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param DeleteFunctionRequest return throws example Click  https to see how to use DeleteFunction API.
      public async deleteFunction ( deleteFunctionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#deleteFunction." ) ; const pathParams = { "{functionId}" : deleteFunctionRequest . functionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : deleteFunctionRequest . ifMatch , "opc-request-id" : deleteFunctionRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteFunctionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/functions/{functionId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteFunctionResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } /**
     * Retrieves an application.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param GetApplicationRequest return throws example Click  https to see how to use GetApplication API.
      public async getApplication ( getApplicationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#getApplication." ) ; const pathParams = { "{applicationId}" : getApplicationRequest . applicationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getApplicationRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getApplicationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/applications/{applicationId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetApplicationResponse > { } , body : await response . json ( ) , bodyKey : "application" , bodyModel : model . Application , type : "model.Application" , 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 ; } } /**
     * Retrieves a function.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param GetFunctionRequest return throws example Click  https to see how to use GetFunction API.
      public async getFunction ( getFunctionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#getFunction." ) ; const pathParams = { "{functionId}" : getFunctionRequest . functionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getFunctionRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getFunctionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/functions/{functionId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetFunctionResponse > { } , body : await response . json ( ) , bodyKey : "function" , bodyModel : model . Function , type : "model.Function" , 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 applications for a compartment.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param ListApplicationsRequest return throws example Click  https to see how to use ListApplications API.
      public async listApplications ( listApplicationsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#listApplications." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listApplicationsRequest . compartmentId , "limit" : listApplicationsRequest . limit , "page" : listApplicationsRequest . page , "lifecycleState" : listApplicationsRequest . lifecycleState , "displayName" : listApplicationsRequest . displayName , "id" : listApplicationsRequest . id , "sortOrder" : listApplicationsRequest . sortOrder , "sortBy" : listApplicationsRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listApplicationsRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listApplicationsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/applications" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListApplicationsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . ApplicationSummary , type : "Array<model.ApplicationSummary>" , 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 listAllApplications ( request ) { return paginateRecords ( request , req => this . listApplications ( req ) ) ; } param request public listAllApplicationsResponses ( request ) { return paginateResponses ( request , req => this . listApplications ( req ) ) ; } param request public listApplicationsRecordIterator ( request ) { return paginateRecords ( request , req => this . listApplications ( req ) ) ; } param request public listApplicationsResponseIterator ( request ) { return paginateResponses ( request , req => this . listApplications ( req ) ) ; } /**
     * Lists functions for an application.
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param ListFunctionsRequest return throws example Click  https to see how to use ListFunctions API.
      public async listFunctions ( listFunctionsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#listFunctions." ) ; const pathParams = { } ; const queryParams = { "applicationId" : listFunctionsRequest . applicationId , "limit" : listFunctionsRequest . limit , "page" : listFunctionsRequest . page , "lifecycleState" : listFunctionsRequest . lifecycleState , "displayName" : listFunctionsRequest . displayName , "id" : listFunctionsRequest . id , "sortOrder" : listFunctionsRequest . sortOrder , "sortBy" : listFunctionsRequest . sortBy } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listFunctionsRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listFunctionsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/functions" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListFunctionsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . FunctionSummary , type : "Array<model.FunctionSummary>" , 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 listAllFunctions ( request ) { return paginateRecords ( request , req => this . listFunctions ( req ) ) ; } param request public listAllFunctionsResponses ( request ) { return paginateResponses ( request , req => this . listFunctions ( req ) ) ; } param request public listFunctionsRecordIterator ( request ) { return paginateRecords ( request , req => this . listFunctions ( req ) ) ; } param request public listFunctionsResponseIterator ( request ) { return paginateResponses ( request , req => this . listFunctions ( req ) ) ; } /**
     * Modifies an application
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param UpdateApplicationRequest return throws example Click  https to see how to use UpdateApplication API.
      public async updateApplication ( updateApplicationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#updateApplication." ) ; const pathParams = { "{applicationId}" : updateApplicationRequest . applicationId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateApplicationRequest . ifMatch , "opc-request-id" : updateApplicationRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateApplicationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/applications/{applicationId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateApplicationRequest . updateApplicationDetails , "UpdateApplicationDetails" , model . UpdateApplicationDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateApplicationResponse > { } , body : await response . json ( ) , bodyKey : "application" , bodyModel : model . Application , type : "model.Application" , 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 ; } } /**
     * Modifies a function
     * This operation uses  common . OciSdkDefaultRetryConfiguration by default if no retry configuration is defined by the user.
     *  param UpdateFunctionRequest return throws example Click  https to see how to use UpdateFunction API.
      public async updateFunction ( updateFunctionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation FunctionsManagementClient#updateFunction." ) ; const pathParams = { "{functionId}" : updateFunctionRequest . functionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "if-match" : updateFunctionRequest . ifMatch , "opc-request-id" : updateFunctionRequest . opcRequestId } ; const specRetryConfiguration = common . OciSdkDefaultRetryConfiguration ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateFunctionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/functions/{functionId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateFunctionRequest . updateFunctionDetails , "UpdateFunctionDetails" , model . UpdateFunctionDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateFunctionResponse > { } , body : await response . json ( ) , bodyKey : "function" , bodyModel : model . Function , type : "model.Function" , 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 ; } } }